a question about Theta(nlgn)# Computation - 科学计算
r*e
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.
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.