Pattern 5

Beginner Problems Patterns Easy
  • Fun fact: This basic problem is designed to test your understanding of loops and string manipulation, which are basic in almost any programming language
  • In the real world, similar patterns and principles might be used for creating complex data visualization tools, ASCII art, or templating engines that generate HTML for web pages
  • Drawing patterns, grids, or other specific shapes is often a core part of game development as well, so praticing such problems can be a kick-start towards learning how to develop basic graphical elements in game designing

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