


1
11
111
1111
The first line contains a single integer ‘T’ representing the number of test cases.
The first line of each test case will contain an integer ‘N’ that is the total number of rows.
For each test case, print the pattern of N lines.
Output for every test case will be printed in a separate line.
1 <= T <= 10
1 <= N <= 10^3
Time Limit: 1 sec
The basic idea of this approach is to print the pattern row-wise. For each row, a pattern is observed: 1 is printed 1 time in the 1st row, 2 times in the 2nd row, 3 times in the 3rd row, and so on. So, a pattern is observed that the number of rows determines how many times 1 is printed in each row.
Here is the algorithm:
The basic idea of this approach is to print the pattern row-wise. For each row, a pattern is observed: 1 is printed 1 time in the 1st row, 2 times in the 2nd row, 3 times in the 3rd row, and so on. So, a pattern is observed that the number of rows determines how many times 1 is printed in each row. So, we will initialize a string ‘STR’ = ‘1’ and then after every row, we will concatenate ‘1’ to the ‘STR’
Here is the algorithm:
Special Numbers
Minimum Operations To Make Array Equal
Ninja's Encryption
Minimum Window Subsequence
Minimum Window Subsequence
Minimum Window Subsequence
Minimum Window Subsequence
Minimum Window Subsequence
Minimum Window Subsequence
Fizzbuzz Problem