Pagini recente » Diferente pentru blog/imbunatatim-infoarena intre reviziile 3 si 9 | Diferente pentru schimbare-borland/alternativa intre reviziile 14 si 3 | Diferente pentru blog/starea-natiunii-2016 intre reviziile 15 si 29 | Istoria paginii runda/eusebiu_oji_2021_cls11-12 | Diferente pentru blog/meet-in-the-middle intre reviziile 114 si 113
Nu exista diferente intre titluri.
Diferente intre continut:
Let's go through a few applications.
h2. 4sum (popular interview question)
h2. 4sum
bq. Given A, an array of integers, find out if there are any four numbers in the array that sum up to zero (the same element can be used multiple times). For example given A = [2, 3, 1, 0, -4, -1] a solution is 3 + 1 + 0 - 4 = 0 or 0 + 0 + 0 + 0 = 0.
bq. Given A, an array of integers, find out if there are any four numbers in the array that sum up to zero (the same element can be used multiple times). For example given A = [2, 3, 1, 0, -4, -1] a solution is 3 + 1 + 0 - 4 = 0 or 0 + 0 + 0 + 0 = 0.
4sum is one of the most popular programming interview questions.
The naive algorithm checks all four number combinations. This solution takes $O(N^4^)$ time.
Nu exista diferente intre securitate.
Topicul de forum nu a fost schimbat.