| Previous Lecture | lect07 | Next Lecture |
lect07,
BST and Big O review (QUIZ 2)
Code from lecture
https://github.com/ucsb-cs24-w26/cs24-w26-lectures/tree/main/lect07
Topics
- Big-O analysis of BST operations: connecting height to running time
- Best case (balanced) vs worst case (skewed) BST heights
- Choosing traversals: preorder, inorder, postorder — when to use which
- Writing recursive BST functions: three approaches to isBST (naive → bottom-up → top-down)
- Top-down vs bottom-up problem solving on trees
- Skipping unnecessary work: data-driven (BST property) vs progress-driven (early termination)