摘要: No.118 Pascal's Triangle ||Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].思路: 生成帕斯卡三角形第rowIndex+1行... 阅读全文
posted @ 2015-06-09 22:16 人生不酱油 阅读(126) 评论(0) 推荐(0) 编辑
摘要: No.118 Pascal's TriangleGivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1],... 阅读全文
posted @ 2015-06-09 22:06 人生不酱油 阅读(98) 评论(0) 推荐(0) 编辑
摘要: No.179 Largest NumberGiven a list of non negative integers, arrange them such that they form the largest number.For example, given[3, 30, 34, 5, 9], t... 阅读全文
posted @ 2015-06-09 21:34 人生不酱油 阅读(289) 评论(0) 推荐(0) 编辑
摘要: No.56 Merge IntervalsGiven a collection of intervals, merge all overlapping intervals.For example,Given[1,3],[2,6],[8,10],[15,18],return[1,6],[8,10],[... 阅读全文
posted @ 2015-06-09 11:16 人生不酱油 阅读(172) 评论(0) 推荐(0) 编辑
摘要: No.57 Insert IntervalGiven a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the int... 阅读全文
posted @ 2015-06-09 10:37 人生不酱油 阅读(384) 评论(0) 推荐(0) 编辑