Pattern 2

Beginner Problems Patterns Easy
  • This programming problem, often considered a basic exercise for beginners, is more significant than it seems at first glance
  • The underlying concept of using loops to generate patterns is a foundational concept of algorithm design and text data visualization in the software industry
  • A real-world application can be seen in terminal-based applications or console game development where text output needs to be visually organized in a certain pattern
  • Additionally, SVG graphics in web development use similar concepts to generate visual patterns and shapes

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