# Tag Archives: pattern-printing

## Arrange numbers 1 to N^2 in a Zig-Zag Matrix in ascending order

Given a positive integer N, the task is to print an N × N zig-zag matrix consisting of numbers from 1 to N2, such that… Read More »

## Print the first N terms of the series 6, 28, 66, 120, 190, 276, …

Given a number N, the task is to print the first N terms of the series 6, 28, 66, 120, 190, 276, and so on.… Read More »

## Find the Nth row in Pascal’s Triangle

Given a non-negative integer N, the task is to find the Nth row of Pascal’s Triangle. Note: The row index starts from 0. Pascal’s Triangle:… Read More »

## Mountain Sequence Pattern

Given a number N , the task is to generate the pyramid sequence pattern which contains N pyramids one after the other as shown in… Read More »

## Python Program to print hollow half diamond hash pattern

Give an integer N and the task is to print hollow half diamond pattern. Examples: Input : 6 Output : # # # # #… Read More »

## Program to Print K using Alphabets

Given a number n, the task is to print ‘K’ using alphabets. Examples: Input: n = 5 Output: A B C D E F A… Read More »

## Program to print half Diamond star pattern

Given an integer N, the task is to print half-diamond-star pattern. * ** *** **** ***** ****** ***** **** *** ** * Examples: Input: N… Read More »

## Program to print modified Binary triangle pattern

Given an integer N, the task is to print the modified binary tree pattern. In Modified Binary Triangle Pattern, the first and last element of… Read More »

## Program to print window pattern

Print the pattern in which there is a hollow square and plus sign inside it. Pattern will be as per the n i.e. number of… Read More »

## Python Program to print a number diamond of any given size N in Rangoli Style

Given an integer N, the task is to print a number diamond of size N in rangoli style where N means till Nth number from… Read More »

## C++ Program to Print Cross or X Pattern

Given a number n, we need to print a X pattern of size n. Input : n = 3 Output : \$ \$ \$ \$… Read More »

## Print Triangle separated pattern

Given a number N, the task is to print the triangle separated pattern. Triangle Separated Pattern: Pattern in which four triangles (left, down, right, up)… Read More »

## Program to print a Hollow Triangle inside a Triangle

Given a number N(≥ 8), the task is to print a Hollow Triangle inside a Triangle pattern. Example: Input: N = 9 Output: * *… Read More »

## Python program to right rotate n-numbers by 1

Given a number n. The task is to print n-integers n-times (starting from 1) and right rotate the integers by after each iteration. Examples: Input… Read More »

## Print the Alphabets A to Z in Star Pattern

Given any alphabet between A to Z, the task is to print the pattern of the given alphabet using star. Examples: Input: A Output: **… Read More »