Lintcode 66 - Binary Tree Inorder Traversal
67 · Binary Tree Inorder Traversal - LintCode # Description Given a binary tree, return the inorder traversal of its nodes‘ values. # Example Example 1: Input: binary tree = {1,2,3} Output: [2,1,3] # Solution 先把左邊的孩子全都放到 stack 裡 peek(): if node.right == null,先 pop 掉 看一下現在的...
more...