Suppose you are given 1 billion \( (1\times 10^{9}) \) unsorted integers on one disk file. How would you determine the largest 100 numbers?
The algorithm works as :
Time complexity = \( O(nlogm) \). where n = Total number of integers in the unsorted array; m = heap size (Here m=100 ). |