Pattern 10

Beginner Problems Patterns Easy
  • In the software development, this pattern problem, or its underlying concept of nested iteration, can often be observed in creating visual effects or graphical interfaces
  • For example, such pattern logic might be used in creating loading animations, pyramid diagrams, or automated design elements in a web or mobile application
  • On a more abstract level, understanding how to construct and manipulate such patterns is fundamental to working with 2D arrays and matrices - structures widely used in image processing, to represent graphs, in machine learning algorithms, and more

Given an integer n. You need to recreate the pattern given below for any value of N. Let's say for N = 5, the pattern should look like as below:


*

**

***

****

*****

****

***

**

*


Print the pattern in the function given to you.

Constraints

  • 1 <= n <= 20

Company Tags

TCS Cognizant Accenture Infosys Capgemini Wipro IBM HCL Tech Mahindra MindTree