Leetcode
文章平均质量分 81
qiuqchen
这个作者很懒,什么都没留下…
展开
-
Leetcode-Pascal's Triangle
题目: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ] 分析:打印杨辉三角。numRows原创 2014-06-28 09:58:54 · 598 阅读 · 0 评论 -
Leetcode-Two Sum
题目: 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 numbers such that they add up to the ta原创 2014-06-27 15:39:19 · 651 阅读 · 0 评论 -
Leetcode-subsets
题目: Given a set of distinct integers, S, return all possible subsets. Note: Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.原创 2014-06-19 16:59:18 · 706 阅读 · 0 评论 -
Leetcode-Sum Root to Leaf Numbers
题目: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which represents the number 123. Find原创 2014-06-21 16:43:37 · 865 阅读 · 0 评论