Construct a binary tree from in-order and post-order arrays.
Given a binary tree, check if there’s a path such that a targetSum
can be reached. A target sum is the sum of values of all visited nodes along the path.
Calculate the maximum depth of a binary tree.
Given two binary trees, p
and q
, return True
if they are the same, that is, if all values are the same and False
otherwise.
Partition a linked list given a value x
as a pivot element so that all nodes that are
smaller than x
come before all nodes that are greater or equal than x
. The original
order of the elements should be retained.