DSA Studio
Search
Home
Sign in
Heaps & Priority Queues Checkpoint
Heap properties, top-K patterns, and multi-way merges.
1. In a min-heap, the root contains:
The smallest element
The largest element
The median
Any element
2. To find the kth largest element using a heap, you should use:
A min-heap of size k
A max-heap of size k
A min-heap of size n
A max-heap of size n
3. Time complexity of heap push and pop operations?
4. When merging k sorted lists with a heap, the time complexity is:
O(n log k)
O(n log n)
O(nk)
O(k log n)
5. In Python, to use a max-heap with heapq, you should:
Submit quiz
Auto-advance on pass