Pascal Triangle Builder

Given an integer numRows, return the first numRows rows of Pascal's triangle as an array of arrays of integers.

In Pascal's triangle:

  • Row 0 is [1]
  • The first and last element of every row is 1
  • Every interior element is the sum of the two elements directly above it
Examples
Input: 5
Output: [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]]
Hints

Pascal Triangle Builder

Given an integer `numRows`, return the first `numRows` rows of Pascal's triangle as an array of arrays of integers.