algorithm - O(NlogN) finding 3 numbers that have a sum of any arbitrary T in an array -


Considering an array A of integers, any of them gets the amount for any t.

I saw it on some online post, which claims to have an O (NLJDN) solution.

For 2 numbers, I know that O (O) can help for O (N), but for 3 numbers, I have one.

I also feel that this problem can be caused by some difficult problems, but the family can not remember it, and therefore Google can not do this. (The worst position is obviously O (n ^ 3), and with 2-digit solution it's actually O (n ^ 2))

It really does not solve anything in the real world Does, just bug me ..

Any ideas?

I think your problem is equivalent


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -