Category: recursive
Given a string s and a string t, check if s is subsequence of t. You may assume that there is only lower case English letters in both s …
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: We can use the …
Given preorder and inorder traversal of a tree, construct the binary tree. You may assume that duplicates do not exist in the tree. For example, given preorder = inorder …
You have 4 cards each containing a number from 1 to 9. You need to judge whether they could operated through *, /, +, -, (, ) to get …
You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not …