1. Use recursion to return values in a bottom-up way in binary tree, 从下往下返值

3 steps:

  1. what do you expect from your left child and right child?(usually it is thte return type of the recursion function)
  2. what do you want to do in the current layer?
  3. what do you want to report to your paren?

题型:

results matching ""

    No results matching ""