Pascal Triangle Builder

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

In Pascal's triangle:

  • Each number is the sum of the two numbers directly above it
  • The first and last elements of each row are 1
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`, generate the first `numRows` of Pascal's triangle.