Pattern 15

Beginner Problems Patterns Easy
  • This type of problem is not directly applied in the software industry, but the underlying concept of iteration and pattern generation is frequently used
  • For instance, it forms a basic approach in developing functionalities for pattern matching, text formatting, and UI elements rendering in web and app development
  • This kind of progressive reduction is also seen in progressive loading of images or elements on web pages or in game developments to save on resource usage

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:


ABCDE

ABCD

ABC

AB

A


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