Back to questions

Pascals Triangle Python Interview Question

Pascals Triangle

Python Interview Question

Given an integer , return the first numRows of Pascal's triangle.

In Pascal's triangle, each number is the sum of the two numbers directly above it as shown:

Pascal's Triangle

For , you should return .

For , you should return .

Difficulty

Easy

Input

Python

Output