Skip to content

Commit 9699972

Browse files
committed
Adding readme file
1 parent a43ea4b commit 9699972

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

118-Pascal'sTriangle/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Given an integer numRows, return the first numRows of Pascal's triangle.
2+
3+
In Pascal's triangle, each number is the sum of the two numbers directly above it as shown:
4+
5+
 
6+
Example 1:
7+
Input: numRows = 5
8+
Output: [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]]
9+
Example 2:
10+
Input: numRows = 1
11+
Output: [[1]]
12+
13+
 
14+
Constraints:
15+
16+
17+
1 <= numRows <= 30
18+

0 commit comments

Comments
 (0)