Skip to content

Reachable Nodes With Restrictions

A Medium coding interview problem in the Trees pattern.

Likely pattern

Trees

Recursive DFS and level-order BFS over hierarchical data.

Recognition cue: A binary tree or BST: depth, paths, ancestors, or level-by-level processing.

Do not confuse it with

Topics

  • Array
  • Hash Table
  • Tree
  • Depth-First Search
  • Breadth-First Search
  • Union Find
  • Graph
  1. 1Medium
  2. 2Medium
  3. 3Medium
  4. 4Medium
  5. 5Medium
  6. 6Medium
  7. 7Medium
  8. 8Medium