Pattern 16

Beginner Problems Patterns Easy
  • Fun Fact: This problem may seem simple but it mirrors a fundamental concept in programming: loops and control structures
  • While in this problem it is used to print patterns, in real world applications, these loops could be used to iterate through data, increment counters, insert into databases or update UI components
  • Moreover, concepts used in this problem are extensively used in animation software, framework development, and even in game development where such pattern logic can be used to create various levels or stages
  • So next time when you see a pattern in a game, remember, it could be something as simple as this problem behind the scene!

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:


A

BB

CCC

DDDD

EEEEE


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