Pascal's Triangle Row
Easy
Math
Array
Math
Given row index k, return the kth row of Pascal's triangle (0-indexed). Print space-separated.
Constraints
0 ≤ k ≤ 33
Examples
Example 1:
Input: 3
Output: 1 3 3 1
Example 2:
Input: 0
Output: 1
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console