On Nov 26, 2006, at 12:18 AM, Roger Hui wrote:

Now that we have mastered zigzag order, how about the
spiral order?  For example, the spiral order for a
4 5 array is:

 0  1  2  3 4
13 14 15 16 5
12 19 18 17 6
11 10  9  8 7


My At Play With J article "Volutes" in Vector 13.2 (October 1996) gives several solutions to the problem, but I doubt many people could improve Joey Tuttle's amazing one.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to