摘要:
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... 阅读全文
摘要:
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of ... 阅读全文
摘要:
O(g(n)) = { f(n) : 存在正常数c和n0 ,使对所有的n >= n0,都有 0 = n0,都有 0 = n0,都有 0 = n0,都有 0 = n0,都有 0 <= cg(n) <= f(n) }。小w记号给出函数的非渐进紧确的下界。 阅读全文
摘要:
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu... 阅读全文
摘要:
Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (including th... 阅读全文
摘要:
Regular Expression MatchingImplement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or mor... 阅读全文
摘要:
Subsets IGiven a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set m... 阅读全文
摘要:
Populating Next Right Pointers in Each Node IGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLin... 阅读全文
摘要:
爱是恒久忍耐,又有恩慈;爱是不嫉妒,爱是不自夸,不张狂,不做害羞的事,不求自己的益处,不轻易发怒,不计算人的恶,不喜欢不义,只喜欢真理;凡事包容,凡事相信,凡事盼望,凡事忍耐。 阅读全文
摘要:
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol... 阅读全文