grid traversal question

Posted by Kensay on Stack Overflow See other posts from Stack Overflow or by Kensay
Published on 2010-05-31T22:00:06Z Indexed on 2010/05/31 22:03 UTC
Read the original article Hit count: 157

Filed under:
|
|
|
|

Given a grid of any height and width, write an algorithm to traverse it in a spiral. (Starting at the top left and ending in the middle) without passing over previously visited nodes. Without using nested loops.

© Stack Overflow or respective owner

Related posts about c++

Related posts about algorithm