views:

1237

answers:

2

How do I print a 5×5 two-dimensional array in spiral order?

Is there any formula so that I can print an array of any size in spiral order?

+1  A: 

This is exactly what you are asking for:

http://haroonsaeed.wordpress.com/2005/09/01/printing-an-array-in-spiral-order/

Prankster
here is the answer i got ithttp://dev-interview-questions.blogspot.com/2009/03/print-2d-array-matrix-spiral-order.html
Rahul Vyas
A: 

Check this out for a comprehensive walkthrough...

http://2600hertz.wordpress.com/2010/03/20/the-mystery-spiral/

CVS-2600Hertz