j**l 发帖数: 2911 | 1 1. If you have 1 million integers, how would you sort them efficiently?
Modify a specific sorting algorithm to solve this.
2. Given a file of 4 billion 32-bit integers, how to find one that appears
at least twice? 分成若干段查找?
3. Find or determine non-existence of a number in a sorted list of N numbers
where the numbers range over M, M >> N and N large enough to span multiple
disks. Find algorithm to beat O(logn). Bonus points for constant time
algorithm.
4. You are given a small sorted list of numb | m*****g 发帖数: 226 | 2 第一题如果没有特别范围的话,只是1million的话可以直接在内存里面搞了。
第二题,32bit的int,一共也就4billion多点。是否可以二分法。
第三提不知
第四 二分 | j**l 发帖数: 2911 | | y*c 发帖数: 904 | 4 For 4, use binary search. Find the disk first and if lower bound and upper
bound are close enough and in one disk. We can bring them into memory.
Hi, jntl, do you mind zz or copy your post in 面试高手俱乐部? that one is
focused on the CS interview questions. | j**l 发帖数: 2911 | 5 Sure, you can zz or copy it.
【在 y*c 的大作中提到】 : For 4, use binary search. Find the disk first and if lower bound and upper : bound are close enough and in one disk. We can bring them into memory. : Hi, jntl, do you mind zz or copy your post in 面试高手俱乐部? that one is : focused on the CS interview questions.
|
|