LeetCode Week 7

145. Binary Tree Postorder Traversal Given a binary tree, return the postorder traversal of its nodes’ values. solutions: 本題意是要求用迭代的方法而不是遞歸輸出一顆二叉樹的後序遍歷。 對於後序遍歷與之前的前序與中序不同的是,在訪問根節點之前需要對它的左右子樹進行判斷,對它的判斷
相關文章
相關標籤/搜索