1. Flatten Binary Tree to Linked Listhistorical

    Flatten a binary tree in place into a linked list whose node order follows the tree's preorder traversal.

  2. Lowest Common Ancestor of a Binary Treehistorical

    Given a binary tree, find the lowest common ancestor of two specified nodes in the tree.

  3. Diameter of Binary Treehistorical

    Given a binary tree, calculate its diameter. The diameter of a binary tree is the maximum path length between any two nodes. This path may or may not pass through the root.

  4. Lowest Common Ancestor Nodehistorical

    Given a binary tree and two nodes o1 and o2 in the tree, find their lowest common ancestor.

  5. Merge Two Binary Treeshistorical

    Merge two binary trees by adding the values of overlapping nodes and retaining nodes that do not overlap.

  6. Symmetric Treehistorical

    Given a binary tree, check whether it is mirror-symmetric.

  7. House Robber IIIhistorical

    Houses form a binary tree, and a parent and its child cannot both be robbed. Choose houses that maximize the total amount stolen.

  8. Sum Root to Leaf Numbershistorical

    Each binary-tree node contains a digit from 0 to 9. Root-to-leaf paths form integers; return their total sum.

  9. Invert Binary Treehistorical

    Invert a binary tree.

  10. Path Sum IIIhistorical

    Count downward paths in an integer-valued binary tree whose sum equals a target. Paths need not start at the root or end at a leaf.