Skip to content

Tag Archives: pattern-printing

Given integer N, the task is to print an upside-down triangle where the left half is made of elements in the range [1, N*(N+1)/2] and… Read More
Given the number N, the task is to print a pattern such that in each line all the digits from N to 1 are present… Read More
In this article, we will learn how to print the pattern G using stars and white-spaces. Given a number n, we will write a program… Read More
The idea of pattern based programs is to understand the concept of nesting of for loops and how and where to place the alphabets /… Read More
Given a string S of length N, find the pattern of the strings as shown below in the examples. Examples:  Input: S = “Geek”Output: Geek,… Read More
Print a ‘Y’ shaped pattern from asterisks in N number of lines. Examples: Input: N = 12Output: *             * *  … Read More
Given a matrix mat[][], print it in Wave Form.  Input: mat[][] = {{  1,   2,   3,   4}           … Read More
Given a matrix of 2D array of n rows and m columns. Print this matrix in ZIG-ZAG fashion as shown in figure.   Example:   Input: 1… Read More
Given a matrix of 2D array of n rows and m columns. Print this matrix in ZIG-ZAG fashion as shown in figure.   Example:   Input: 1… Read More
Given a 2D array, print it in reverse spiral form. We have already discussed Print a given matrix in spiral form. This article discusses how… Read More
Given a 2D array, print it in reverse spiral form. We have already discussed Print a given matrix in spiral form. This article discusses how… Read More
Given a 2D array, print it in reverse spiral form. We have already discussed Print a given matrix in spiral form. This article discusses how… Read More
Given a 2D array, print it in reverse spiral form. We have already discussed Print a given matrix in spiral form. This article discusses how… Read More
Given a 2D array, print it in reverse spiral form. We have already discussed Print a given matrix in spiral form. This article discusses how… Read More
Given 3 positive integer c1, c2 and n, where n is size of 2-D square matrix. The task is to print the matrix filled with… Read More

Start Your Coding Journey Now!