Search⌘ K

Exercise: Heaps

Learn to implement the remove(i) method in a BinaryHeap that deletes an element at a given index in O(log n) time. This exercise provides you sample input and output to practice and prepare for understanding heap operations more deeply.

We'll cover the following...

Task

Implement the remove(i) method, that removes the value stored in a[i] in a BinaryHeap. This method should run in O(logn ...