Browse
Heaps / Priority Queues
A tree-shaped structure that keeps the min (or max) element accessible in O(1), with O(log n) insert and remove.
Q1.What property does a min-heap guarantee?
Q2.What is the time complexity of inserting an element into a heap?
Q3.What is the time complexity of finding the k largest elements in an array of size n using a min-heap of size k?
Q4.What underlying data structure is a binary heap typically implemented with?
