Back to questions

Pascals Triangle Uber Python Interview Question

Pascals Triangle

Uber 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 .

Input

Python

Output