摘要:
Invert a binary tree. Example: Input: 4 / \ 2 7 / \ / \ 1 3 6 9 Output: 4 / \ 7 2 / \ / \ 9 6 3 1 # Definition for a binary tree node. # class TreeNod 阅读全文
posted @ 2020-03-01 16:02
米开朗菠萝
阅读(74)
评论(0)
推荐(0)
摘要:
Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, 阅读全文
posted @ 2020-03-01 11:26
米开朗菠萝
阅读(133)
评论(0)
推荐(0)
摘要:
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree [3 阅读全文
posted @ 2020-03-01 10:23
米开朗菠萝
阅读(136)
评论(0)
推荐(0)