微博:http://www.weibo.com/cathyhwzn
刷题必备书籍:Cracking the Coding Interview: 150 Programming Questions and Solutions
Given numRows, generate the first numRows of Pascal's triangle.
For example, given numRows = 5,
Return
Return
[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ]
弱爆题没啥好说的,下标别搞错就行了。
No comments:
Post a Comment