
1
123
12345
1234567
123456789
12345678912
1234567891234
123456789123456
1234567891234
12345678912
123456789
1234567
12345
123
1
The first line contains a single integer ‘T’ denoting the number of test cases to be run. Then the test cases follow.
The first and the only line of each test case contains a single integer 'N' denoting the number of rows.
For each test case return the corresponding pattern in the next ‘N’ lines.
You are not required to print anything, it has already been taken care of. Just implement the function.
1 <= T <= 10
1 <= N <= 500
Time Limit : 1 sec
In this pattern, each row starts with 1 and also ends with 1 and it is a diamond pattern so every row contains odd items.
Algorithm :