Skip to content

Tag Archives: pattern-printing

Given a binary tree, target node X and a string patt. The task is to find the last node of the binary tree following the… Read More
This article is aimed at giving a recursive implementation for pattern printing. Simple triangle pattern: C++ // C++ code to demonstrate star pattern #include <iostream>… Read More
The program must accept a string S and an integer N as the input. The program must print the desired pattern as shown below: Examples:… Read More
Given an integer N, the task is to print the given pattern. Examples: Input: 3 Output: 1 2 4 3 5 7 6 8 9… Read More
The program must accept an integer N as the input. The program must print the desired pattern as shown in the example input/ output. Examples:… Read More
Given a string str, the task is to print the pattern given in the examples below: Examples: Input: str = “geeks” Output: geeks *kee* **e**… Read More
Given a matrix of 2-Dimensional array of n rows and n columns. Print this matrix in snake fashion starting from column n-1 as shown in… Read More
Given a matrix of 2-Dimensional array of n rows and n columns. Print this matrix in ZIG-ZAG fashion starting from column n-1 as shown in… Read More
Given an integer N, the task is to print the Alphabet H Pattern as given below: 1 N 2 * 3 3 * 2 N… Read More
Given an integer N, the task is to print the Alphabet Z Pattern as given below: 1 2 3 * * * N * *… Read More
Given an integer N, the task is to print the Alphabet N Pattern as given below: 1 1 2 2 2 3 3 3 *… Read More
Given the number of lines as N, the task is to form the given hollow Triangle pattern. Examples: Input: N = 6 Output: ************ *****… Read More
Given an integer N as input, the task is to print the Magical Pattern as given below: N . . 3 2 1 2 3… Read More
Given a matrix of size n*n, print the matrix in the following pattern.  Output: 1 2 5 3 6 9 4 7 10 13 8… Read More
Given a number N denoting the number of rows. The task is to print the zigzag pattern with N rows as shown in the below… Read More