Triangle of Numbers Pattern
Ninja is tasked with printing a triangle pattern based on a given number 'N' for any test case.
Example:
Input:
N = 4
Output:
1
232
34545
4567654
Explanation:
The pattern comprises numbers aligned in a triangle, centered and incremented with each row.
Constraints:
1 <= T <= 5
1 <= N <= 100
- The number of test cases 'T'.
- The number of rows 'N'.
- Time limit: 1 sec.
Be the first one to answer
Add answer anonymously...
Top Info Edge Software Developer interview questions & answers
Popular interview questions of Software Developer
Top HR questions asked in Info Edge Software Developer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app