Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Last Updated: 21 Apr, 2017

Pascals Triangle

Moderate
Asked in company
Inca Infotech Technologies Private Limited

Problem statement

Given an integer N, you need to print the Pascal's triangle.

Note : The values of pascal's triangle can be large, so take mod with 10^9 + 7.

For eg. N = 4

   1
  1 1
 1 2 1
1 3 3 1

You can read more about Pascal's triangle here

Input Format :
Integer N
Output Format :
Pascals triangle in N lines
Constraints :

1 <= N <= 500