# Find Kth row of Pascal's Triangle

Posted: 9 Jan, 2021
Difficulty: Easy

## PROBLEM STATEMENT

#### Example :-

``````INPUT : K = 2
OUTPUT: 1 1

In the above example, K = 2, Hence the 2nd row from the top of pascal’s triangle, as shown in the above example is 1 1.

INPUT   : K = 4
OUTPUT  : 1 4 6 4 1

In the above example, K = 4, Hence the 4th row from the top of pascal’s triangle, as shown in the above example is 1 3 3 1.
``````
##### Input Format
``````The first line of input contains an integer 'T' representing the number of the test case. Then the test case follows.

The first and the only line of each test case contains a single integer “K”.
``````
##### Output Format:
``````For every test case, print a single line containing 'R' space-separated integers showing the Kth row of pascal’s triangle, where 'R' is the number of elements in a particular row.

The output of each test case will be printed in a separate line.
``````
##### Note
``````You don’t have to print anything, it has already been taken care of. Just implement the given function.
``````
##### Constraints:
``````1 <= T <= 50
1 <= K <= 50

Where ‘T’ is the number of test cases, ‘K’ is the input row number.

Time limit: 1 sec.
``````