樹的遍歷

樹的遍歷 前序遍歷 中序遍歷 後序遍歷 前序遍歷 Pre-order Traversal 前序遍歷先訪問根節點,再訪問左節點,最後訪問右節點。 Given a binary tree, return the preorder traversal of its nodes’ values. Example: Input: [1,null,2,3]   1     \       2       /
相關文章
相關標籤/搜索