1355. Yang Hui triangle
Chinese
English
Given a non-negative integer * numRows, * generates the first numRows row of Yang Hui triangle .
In the Yang Hui triangle, each number is the sum of its upper left and upper right numbers.
Sample
Example 1:
输入: 5
输出:
[
[1],
[1,1],
[1,2,1],
[1,3,3,1],
[1,4,6,4,1]
]
Example 2:
输入: 3
输出:
[
[1],
[1,1],
[1,2,1]
]