Key Word(s): Binary search trees, BST Traversal, Heaps, Priority Queues, Generators
Note: No need to turn any lecture exercises in today.
Exercise 1¶
Traverse the BST provided using in-order, post-order, and pre-order traversals. Write the resulting sorted data structure (as a list is fine).
Exercise 2¶
- Construct a min-heap for the array $$\left[1, 8, 5, 9, 23, 2, 45, 6, 7, 99, -5\right].$$
- Delete $-5$ and update the min-heap.