Pascal’s Triangle
Given a non-negative integer numRows, generate the first numRows of Pascal’s triangle.
(杨辉三角)
Example:
1. 逐层生成
根据杨辉三角的规律,组成生成杨辉三角,具体实现过程如下:
1 | class Solution: |
Given a non-negative integer numRows, generate the first numRows of Pascal’s triangle.
(杨辉三角)
Example:
根据杨辉三角的规律,组成生成杨辉三角,具体实现过程如下:
1 | class Solution: |