17.1k views
4 votes
You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate?

a. Heap sort
b. Merge sort
c. Quick sort
d. Insertion sort

User Tekknolagi
by
3.4k points

1 Answer

2 votes
I’m guessing that what’s being looked at here moreso is the space complexity of these algorithms. Heap sort and insertion sort I believe have the lowest of these, but insertion sort is also known to not be the best with time complexity. Therefore heap sort should take the cake
User Rodriquez
by
3.4k points