* *
* *
* * *
* *
* *
The first line contains ‘T’, denoting the number of test cases.
Each test case contains a single integer ‘N’, denoting the number of rows.
For each test case, print the 'N' strings denoting the required pattern in the following ‘N’ lines.
You are not required to print the expected output; it has already been taken care of. Just implement the function.
1 <= T <= 10
1 <= N <= 10^3
Time Limit: 1 sec
The key here is to traverse all the lines sequentially, and for each line, we print the required character at the given index.
The steps are as follows:
Print Name
Print Name
Print Name
Print Name
Print Name
Matrix Boundary Traversal
Star Triangle
Count Repeating Digits
Inverted Left Half Pyramid