While scanning a file containing 1 million items once and retaining only 10…
PYQ CoCubes 2024
While scanning a file containing 1 million items once and retaining only 10 candidates, which data structure gives O(1) access to the smallest retained candidate and O(log 10) replacement time for maintaining the 10 largest items?
- A.
Min-heap
- B.
Max-heap
- C.
BST
- D.
Sorted array
Attempted by 124 students.
Sign up free to check your answer
Sign up freeLoading lesson…

