Skip to content
Shao ye edited this page Apr 15, 2019 · 7 revisions

Tree Problems

Divide & Conquer -> Sub Problems -> Recursive & Iterative

Recursive Approach

  1. Find out the best base case
  2. Deal with the result (return) of sub-problems
  3. Solve sub-problems, finally

Iterative Approach

  1. What previous value (state) to store
  2. When to use the stored value
  3. When to update the stored value

Traverse

Clone this wiki locally