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
▲ Console

Install Talent Arabia

Get instant access to jobs and career tools on your device.