r****e 发帖数: 9 | 1 find a Theta(nlgn) algrithm that given a set S of n integers and another
integer x, determines whether or not there exist two elements in S whose sum
is exactly x.
I thought it long time, but still no clue. Thanks a lot. | r****e 发帖数: 9 | 2 I found the solution. Haha...
【在 r****e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : find a Theta(nlgn) algrithm that given a set S of n integers and another : integer x, determines whether or not there exist two elements in S whose sum : is exactly x. : I thought it long time, but still no clue. Thanks a lot.
|
|