Tap here to switch tabs
Problem
Submissions

Problem: Pascal's Triangle II

Pascal's Triangle II gives you a zero-based row number and asks you to return that row as an array, with each interior value defined by the two values directly above it.

Statement

Given an integer rowIndex, return the rowIndexth row of Pascal’s triangle.

In Pascal’s triangle, each value is the sum of the two values directly above it.

Note: The rowIndexth row is indexed starting from 0.

Constraints:

  • 0≤0 \leq rowIndex ≤33\leq 33

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Pascal's Triangle II

Pascal's Triangle II gives you a zero-based row number and asks you to return that row as an array, with each interior value defined by the two values directly above it.

Statement

Given an integer rowIndex, return the rowIndexth row of Pascal’s triangle.

In Pascal’s triangle, each value is the sum of the two values directly above it.

Note: The rowIndexth row is indexed starting from 0.

Constraints:

  • 0≤0 \leq rowIndex ≤33\leq 33