Data Structures19 sections · 729 units
Open in Course

Section Recap

What you learned

BST property: left < node < right for all nodes. Operations: Search, insert, delete all O(h)O(h) where hh is height. Inorder traversal gives sorted order. Patterns:

  • Validate by passing min/max bounds
  • Successor: leftmost in right subtree
  • Balance matters: worst case O(n)O(n)

Problems: Validate BST, kth smallest, LCA, recover BST.

Time: O(h)O(h). Space: O(h)O(h).