LeetCode 94:Binary Tree Inorder Traversal(中序遍歷)

Given a binary tree, return the inorder traversal of its nodes’ values.node For example: Given binary tree {1,#,2,3},web 1 \ 2 / 3算法 return [1,3,2]. 題目要求對二叉樹進行非遞歸的中序遍歷,所謂中序遍歷即,先訪問左子樹、再訪問根節點、而後是右子樹。一般採
相關文章
相關標籤/搜索