A collection of Hello World applications from helloworld.org.

Binary Tree的2个重点: DFS和BFS.

Traverse

必须会iteration. 可以先背下来.

  • Pre
  • in -> Iterator题目
  • Post

Divide and Conquer

Binary Tree里面的DC和Traverse都是recursion, 本质的区别是D&C的recursion有return, 而Traverse里面的recursion仅仅是用来走Tree, 并不需要return.

p1. Binary Tree Maximum Path Sum

  • 3721 先用D&C.

p2. LCA I/II. (区别是有没有parent pointer)

Comments

<<<<<<< Updated upstream ======= >>>>>>> Stashed changes <<<<<<< Updated upstream ======= >>>>>>> Stashed changes