Top 50 Heap Interview Questions
The most frequently asked Heap questions across all roles and companies, ranked by real interview frequency. Updated daily.
Implement an LRU cache in O(1) average time using a hash table and doubly linked list.
Allianz
ICF
InsuletImplement an LRU cache with O(1) get and put operations using a hash map and doubly linked list.
Collins Aerospace
Larsen & Toubro
Del Rey Systems & TechnologyFind the k most frequent elements in an array using counting and a heap or bucket strategy.
Allegis Group
Delta Electronics Americas
AccentureImplement an O(1) average-time LRU cache with per-entry expiration using a hash map, doubly linked list, and thread-safe access.
Deepgram
NetDocuments
InflectionFind the kth largest value in an unsorted array using a selection algorithm or heap.
One
Amazon
22nd Century TechnologiesCompute maximum values for every fixed-size telemetry window using a monotonic deque in O(n) time.
Hewlett Packard Enterprise Development
ABC
ABC FamilySign up to see every question
Create a free account to unlock this list and practice real interview questions.
Problem At Meta, imagine multiple pre-sorted event streams need to be combined into one ordered feed. Given k sorted singly linked lists, merge them into o...
Meta
GoogleUse a heap or sorting by squared distance to return the k closest 2D points to the origin.
Meta
Sift
Zynga