Tap here to switch tabs
Problem
Submissions

Problem: Pascal's Triangle II

med
30 min
Try to solve the Pascal's Triangle II problem.

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

med
30 min
Try to solve the Pascal's Triangle II problem.

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