Problem Link:
https://oj.leetcode.com/problems/symmetric-tree/
To solve the problem, we can traverse the tree level by level. For each level, we construct an array of values of the length 2^depth, ...
Problem Link:
https://oj.leetcode.com/problems/same-tree/
The following recursive version is accepted but the iterative one is not accepted...
# Definition for a binary tree node
# class TreeNode:...
1020 Tree Traversals (25 分)
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed t...
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,9,20,#,#,15,7},
3
/ \
...