1. Reconstruct Binary Treehistorical

    Given the preorder traversal and inorder traversal results of a binary tree, reconstruct the binary tree. Assume that the input preorder traversal and inorder traversal results contain no duplicate numbers.

  2. 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.

  3. Paths in a Binary Tree With a Given Sumhistorical

    Given the root node of a binary tree and an integer, print all paths in the binary tree whose node values sum to the given integer. A path is defined as the nodes traversed from the root node of the tree downward to a leaf node.

  4. 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.

  5. Serialize a Binary Treehistorical

    Implement two functions to serialize and deserialize a binary tree respectively.

  6. Invert Binary Treehistorical

    Invert a binary tree.

  7. Convert a String to an Integerhistorical

    Convert a string to an integer without using a library function that converts strings to integers. Return 0 if the value is 0 or if the string is not a valid numeric value.

  8. 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.

  9. Reverse Word Orderhistorical

    Reverse the order of words in an English sentence while preserving the character order within each word.

  10. Maximum Depth of Binary Treehistorical

    Given a binary tree, find its maximum depth.