DSA Master › Topic 12

Binary Search Trees

In a BST, everything on the left is smaller than the node and everything on the right is larger. Two consequences matter most: an inorder traversal visits values in sorted order, and you can discard half the tree at each step.

Concepts

How to recognise it

Common pitfalls

Problems

  1. Validate Binary Search Tree (Medium)
  2. Kth Smallest Element in a BST (Medium)
  3. Lowest Common Ancestor of a Binary Search Tree (Medium)
  4. Insert into a Binary Search Tree (Medium)
  5. Delete Node in a BST (Medium)