[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/Scarlet-Coder/Java-Programs/master/SpiralMatrix.java [Back]  [Original]

/*Spirally traversing a matrix
Traversing an array is an elementary operation on an array, in which each element will be processed 
for some operation. Printing elements is one example operation.

So, complete the below function, which given a two dimensional array, print the array 
in spiral form rotating clockwise.


Input Format

Each test-case will begin with two number m and n where m = no. of rows and
 n = no. of columns. m rows will follow with n integers in each row separated
  by a space. Constraint : 1

Web Proxy Viewer  |  New URL  |  Original Page