原创 Combination Sum II Java
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the ca
原创 Unique Binary Search Trees Java
Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n =
原创 Permutations Java
Given a collection of numbers, return all possible permutations. For example,[1,2,3] have the following permutations
原创 Permutations II Java
Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1
原创 Plus One Java
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such
原创 Android Interview question
Ref:http://androidjayavelu.blogspot.com/p/android-interview-question.html Android Interview question What is An
原创 Restore IP Addresses Java
Given a string containing only digits, restore it by returning all possible valid IP address combinations. For exampl
原创 Pascal's Triangle Java
Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1],
原创 Pascal's Triangle II
Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3, Return [1,3,3,1]. Note: Cou
原创 Generate Parentheses Java
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example,
原创 Length of Last Word Java
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last wo
原创 Implement strStr() Java
Implement strStr(). Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of
原创 Best Time to Buy and Sell Stock III Java
Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to fi
原创 Reverse Words in a String Java
Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sk
原创 Unique Binary Search Trees II Java
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example, Given n =