In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of...
Given a binary tree, return the preorder traversal of its nodes' values.
Given a binary tree, return the inorder traversal of its nodes' values.
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
107. Binary Tree Level Order Traversal II
103. Binary Tree Zigzag Level Order Traversal
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
226. Invert Binary TreeInvert a binary tree.Example:Input: 4 / 2 7 / / 1 3 6 9Output: 4 / 7 2 / / 9 ...
Given a binary tree, return all root-to-leaf paths.
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.