标签:interview
What are the common sorting algorithms?
http://en.wikipedia.org/wiki/Sorting_algorithm
Merge sort, divide and conquer
Quick sort, using a pivot. all numbers bigger than pivot goes one side.
Insert sort
bubble sort, swap. shell sort.
Heap sort?
...
If a 2 GB file, with one string per line.
Properly using a merge sort with multiple threads. (not spliting to 2 parts, but N parts. And Merge from N.
)
This is because we don‘t need to load the 2GB data into memory all the time.
And multi-threads helps speed up.
标签:interview
原文地址:http://7371901.blog.51cto.com/7361901/1586516