Pascal's Triangle
Given an integer numRows, return the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers directly above it.
Pascal's Triangle

Given an integer numRows, return the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers directly above it.

Example 1:
Input: 5
Output: [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]]
Input
arr =5
Generate Pascal's Triangle with 5 rows
Rows built: 0 / 5
Pattern:
• First and last element of each row = 1
• Middle elements: triangle[i][j] = triangle[i-1][j-1] + triangle[i-1][j]
Current Row
Variables
No variables to display
DepthFunction Call
Stack empty
0/6