原文:[LeetCode] 144. Binary Tree Preorder Traversal 二叉樹的先序遍歷

Given a binary tree, return thepreordertraversal of its nodes values. Example: Follow up:Recursive solution is trivial, could you do it iteratively 一般我們提到樹的遍歷,最常見的有先序遍歷,中序遍歷,后序遍歷和層序遍歷,它們用遞歸實現起來都非常的簡單 ...

2014-12-05 16:29 3 11564 推薦指數:

查看詳情

 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM