摘要:
Generate ParenthesesGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a... 阅读全文
摘要:
N-Queens IThen-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return a... 阅读全文
摘要:
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be ... 阅读全文
摘要:
Path Sum IGiven a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the gi... 阅读全文