Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.4K+ articles
Misc
7.7K+ articles
Amazon
1.9K+ articles
Tree
911+ articles
Microsoft
811+ articles
Matrix
743+ articles
Binary Tree
330+ articles
Morgan Stanley
229+ articles
pattern-printing
172+ articles
spiral
26 posts
Recent Articles
Popular Articles
Print a singly linked list in spiral order
Last Updated: 23 July 2025
Given a Linked list, the task is to print a singly linked list in a spiral fashion, starting from the mid and rotating clockwise. If the linked list has even nodes, then y...
read more
Linked List
DSA
Linked Lists
spiral
Create Spiral Matrix from Array
Last Updated: 23 July 2025
Given an arrayarr[]and two valuesn and m, the task is to fill amatrixof sizen*min aspiral (or circular)fashion (clockwise) with given array elements.Examples: Input: n = 4...
read more
Pattern Searching
Matrix
Geeks Premier League
Geeks-Premier-League-2022
DSA
Arrays
spiral
Java Program to Print a given matrix in reverse spiral form
Last Updated: 23 July 2025
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 to do the reverse printing. Se...
read more
Java
spiral
pattern-printing
PHP Program to Print a given matrix in reverse spiral form
Last Updated: 23 July 2025
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 to do the reverse printing. Ex...
read more
PHP
spiral
pattern-printing
Python Program to Print a given matrix in reverse spiral form
Last Updated: 23 July 2025
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 to do the reverse printing. Se...
read more
Python
spiral
pattern-printing
Javascript Program to Print a given matrix in reverse spiral form
Last Updated: 23 July 2025
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 to do the reverse printing. Se...
read more
JavaScript
spiral
C++ Program to Print a given matrix in reverse spiral form
Last Updated: 23 July 2025
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 to do the reverse printing. Se...
read more
C++
spiral
pattern-printing
Print boundary elements of a given matrix in clockwise manner
Last Updated: 23 July 2025
Given a matrix arr[][] of size N * M, the task is to print the boundary elements of the given matrix in a clockwise form.Examples:Input: arr[][] = {{1, 2, 3}, {4, 5, 6}, {...
read more
DSA
spiral
Print matrix elements diagonally in spiral form
Last Updated: 23 July 2025
Given a matrix arr[][] of dimensions N * M and an integer K, the task is to print all elements of the matrix starting from the top-left element up to K diagonally in spira...
read more
DSA
spiral
pattern-printing
array-traversal-question
Level order traversal in spiral form using stack and multimap
Last Updated: 15 July 2025
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 first and second level of tree are printed normal...
read more
DSA
spiral
cpp-stack
cpp-multimap
Traversal
Create Spiral Matrix from Array using Direction Arrays
Last Updated: 12 July 2025
Given an array arr[] and two values n and m, the task is to fill a matrix of size n*m in a spiral (or circular) fashion (clockwise) with given array elements.Examples: Inp...
read more
Misc
Matrix
DSA
spiral
Convert given Matrix into sorted Spiral Matrix
Last Updated: 12 July 2025
Given a matrix, the task is to convert the given Matrix into sorted Spiral Matrix.Examples:Input: y[][] = { { 2, 5, 12 }, { 22, 54, 55 }, { 1, 6...
read more
DSA
spiral
Recursive Program to Print extreme nodes of each level of Binary Tree in alternate order
Last Updated: 11 July 2025
Given a binary tree, the task is to print nodes of extreme corners of each level but in alternate order.Examples:Input : 1 / \ 2 3 / / \...
read more
DSA
Binary Tree
spiral
Reverse Clockwise spiral traversal of a binary tree
Last Updated: 11 August 2021
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 traverse the ...
read more
DSA
Binary Tree
spiral
Tree Traversals
Print a given matrix in counter-clock wise spiral form
Last Updated: 05 December 2022
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 9 10 11 12...
read more
Misc
Matrix
DSA
spiral
1
2