Basic Pattern Questions
Basic Pattern Questions
Input: n = 5
Output:
12
123
1234
12345
Input: n = 5
Output:
*****
****
***
**
3. Pyramid Pattern
Input: n = 5
Output:
***
*****
*******
*********
4. Diamond Pattern
Input: n = 5
Output:
***
*****
*******
*********
*******
*****
***
5. Square Border
Input: n = 5
Output:
*****
* *
* *
* *
*****