Category: DFS
Given a binary tree root, return the largest absolute difference between any node and its descendants. For example, given the following tree: 0 / \ 4 2 / \ …
Given a binary tree root, return whether for every node in the tree other than leaves, its value is equal to the sum of its left child’s value and …
Given a binary tree root, return the sum of each of the diagonals in the tree starting from the top to bottom right. For example, given 1 / \ …
Given a non-empty array nums containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is …
A binary expression tree is a kind of binary tree used to represent arithmetic expressions. Each node of a binary expression tree has either zero or two children. Leaf …