[LeetCode 101] Symmetric Tree [Java]
1. Description Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). Note:Bonus points if you could solve ...
1. Description Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). Note:Bonus points if you could solve ...
1. Description Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are ...
1. Description Given a binary tree, return the preorder traversal of its nodes' values. Note: Recursive solution is trivial, could you do it ite...
1. Description Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. 2. Example Below...
1. Description Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. The update(i, val) function mo...
1. Description Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference between the su...
1. Description Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A...
1. Description Invert a binary tree. 2. Runtime Distribution 3. Submission Details 4. Example 4 / \ 2 7 / \ / \ 1 3 6 ...
1. Description Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in...
1. Description Given a list of unique words, find all pairs of distinct indices (i, j) in the given list, so that the concatenation of the two word...