# Tag Archives: spiral

Given two values M and N, fill a matrix of size ‘M*N’ in a spiral (or circular) fashion (clockwise) with given array elements. Examples:  … 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 a matrix arr[][] of size N * M, the task is to print the boundary elements of the given matrix in a clockwise form.… Read More
Given a matrix arr[][] of dimensions N * M and an integer K, the task is to print all elements of the matrix starting from… Read More
Given a binary tree of N nodes, the task is to print level order traversal in a spiral form. In spiral form, nodes at the… Read More
Given a matrix, the task is to convert the given Matrix into sorted Spiral Matrix.Examples:   Input: y[][] = { { 2, 5, 12 }, {… Read More
Given an array, the task is to form a spiral matrix  Examples:  Input: arr[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,… Read More
Given a binary tree, the task is to print nodes of extreme corners of each level but in alternate order.Examples:   Input : 1 / \… Read More
Given a Binary Tree. The task is to print the circular reverse clockwise spiral order traversal of the given binary tree.Reverse Clockwise Traversal means to… Read More
Given a 2D array, print it in counter-clock wise spiral form. See the following examples.Examples :   Input: 1 2 3 4 5 6 7 8… Read More
Introduction The Ulam spiral is a graphical depiction of the set of prime numbers, devised by mathematician Stanislaw Ulam. It is constructed by writing the positive… Read More