Engrain by ByteRush

DSA.10 3 concepts

Trees

Solve tree problems with DFS and BFS templates.

  1. DSA.10.01Pattern 11: Tree DFSCoreMid-levelBeing written
  2. DSA.10.02Pattern 12: Tree BFSCoreMid-levelBeing written
  3. DSA.10.03Pattern 13: Binary search treesMid-levelBeing written

Interview questions in this module

  1. Find the maximum depth of a binary tree recursively and iteratively.
  2. What is the difference between DFS and BFS? When do you use each?
  3. Validate a BST. Why is checking only the children wrong?
  4. Find the lowest common ancestor of two nodes.
  5. Serialize and deserialize a binary tree.