b***k 发帖数: 2673 | 1 ☆─────────────────────────────────────☆
ilovelp (nothing) 于 (Fri Jan 4 14:53:58 2008) 提到:
suppose you have a set of unsorted numbers from 1 to N (a big number, say 1
million). One number is missing, how to find that missing number most
efficiently?
Adding the number then subtract N(N+1)/2 may not be possible since the
number could be too big to store.
☆─────────────────────────────────────☆
Jadeson (Jadeson) 于 (Fri Jan 4 15:32:14 2008) 提到:
那就用高精度加法算法就是咯。
☆──────────────────────────── |
|