C.W.K.
Stream
Quiz · 4 questions

⛰️ Heaps & Priority Queues

Always know the best, without keeping everything sorted

Level 0Curious Beginner
0 XP0/85 lessons0/19 achievements
0/100 XP to next level100 XP to go0% complete

Quiz

01A (min-)heap maintains what property?
02A binary heap is stored in an array. The children of index i live at...
03For a heap, peek-the-min is O(1) but pop-the-min is O(log n). Why?
04When is a heap the right structure (vs a sorted list or a hash map)?
Hint
Think 'I always want the most urgent/biggest/smallest next, and items keep arriving.'
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.