← Heaps & Priority Queues Quiz: all 8 questions
Heaps & Priority Queues Quiz · Question 8 of 8
Which questions are good fits for a heap? (select all that apply)
Which questions are good fits for a heap? (select all that apply)
- A.Top K frequent elements
- B.K closest points to the origin
- C.Check if a string is a palindrome
- D.Reverse a linked list
Answer & explanation
Correct answer: Top K frequent elements · K closest points to the origin
"K-th / top K / closest K / repeatedly take the min or max" are heap signals.
Can you get the rest right without peeking?
Take the timed Heaps & Priority Queues Quiz quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →