[RESOLVED] Algo needed: Spiral of numbers based on _n_
I'm trying to solve this one assignment we have in PHP.
Based on the given number n, the script is supposed to print out a n*n grid of numbers following the pattern in this image:
In this example the given number n is 4.
Would any of you have an idea for a good algorithm?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread