Pattern Problem

0

2 votes
Easy
Problem

Print the following pattern for given number of rows.

Eg1.
 
Pattern for N=3 

1   1
 2 2
  3
  
  
Pattern for N=5

1       1
 2     2
  3   3
   4 4 
    5
   4 4 
  3   3
 2     2
1       1
    
    
Input : N 

Output : Pattern

Note :  Value of N would be less than 9 in all test cases.

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?