All coding problems that can be formatted into tree structures are mostly can be solved by either breadth first search or depth first search.

  • Different from breadth first search is implemented using stack
  • Depth first search takes a divide and conquer approach which is implemented using recursion.

Comments