SarthakKeshari / Java-Questions-and-Solutions

This repository aims to solve and create new problems from different spheres of coding. A path to help students to get access to solutions and discuss their doubts.
MIT License
47 stars 98 forks source link

Spiral Traversal #338

Closed 2devyank closed 2 years ago

2devyank commented 2 years ago

Enter your question -

In this question will have to print element of matrix in spiral form . Basically you have to print character moving from outer most layer to inner most layer spirally

Sample Case

Input: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 25 26 28 29 30 Output: 1 6 11 16 21 26 27 28 29 30 25 20 15 10 5 4 3 2 7 12 17 22 23 24 19 14 9 8 13 18

Tags for the question(eg - Array, Basic, Stack, etc.) -

Array

2devyank commented 2 years ago

@SarthakKeshari please assign me

SarthakKeshari commented 2 years ago

@2devyank, Kindly add your solution to "Arrays/2D Arrays" folder Deadline - 09/10/2021