Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 600 Bytes

pascals_triangle_1.md

File metadata and controls

27 lines (19 loc) · 600 Bytes

Pascal's Triangle 1

Given positive integer $$n$$ as input, generate the first $$n$$ number of rows of the Pascal's triangle.

In mathematics, Pascal's triangle is a triangular array of the binomial coefficients. © Wikipedia

Example

Input: 5
Ouput:
[
    [1],
    [1,1],
    [1,2,1],
    [1,3,3,1],
    [1,4,6,4,1]
]

Solution coming up... :)