摘要:
Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. 1... 阅读全文
摘要:
Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac... 阅读全文
摘要:
Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))... 阅读全文
摘要:
1.Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated n... 阅读全文
摘要:
Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given "25525511135",return ["255... 阅读全文
摘要:
Follow up for ”Unique Paths”:Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i... 阅读全文
摘要:
Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors. 1 /** 2 * Definition for undirected graph. 3 * struct U... 阅读全文