chenming831@hotmail.com
BAN USER
Comments (6)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
I think it should be random(i,N), since it is also possible that we do not need to change i.
- chenming831@hotmail.com May 16, 2010Comment hidden because of low score. Click to expand.
0
of 0 vote
What do you exactly mean?
- chenming831@hotmail.com May 16, 2010Comment hidden because of low score. Click to expand.
0
of 0 vote
We sort the array first O(n)
For each integer, we do binary search for sum-integer in the remaining array, which requires O(log(n))
Therefore, the total is O(nlog(n)).
accu rp
Comment hidden because of low score. Click to expand.
0
of 0 vote
compare the addr of an array is wrong. No matter go down or up, &array[0] is less than &array[1].
- chenming831@hotmail.com May 16, 2010Comment hidden because of low score. Click to expand.
0
of 0 vote
what are u doing? I do not understand.
- chenming831@hotmail.com May 16, 2010Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
Not exactly. We can count the digits.
- chenming831@hotmail.com May 16, 2010