Grid

From Progteam

Revision as of 03:24, 22 February 2008 by Hjfreyer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Many programming challenges somehow involve grids. These can be simple, two dimensional rectangular grids, or more complex, weird grids with hexagonal cells (like a honey comb). These problems often ask you to find the shortest path from one position to another, or some similar task. Note that grids can always be represented as graphs, and general shortest path algorithms will work, but knowing something about the grid itself often makes using these generalized solutions impractical. You can do much better by analyzing the structure of the grid rather than discarding that information and using a generic search algorithm.

Skiena has a whole chapter on these, which should be explored by someone soon.

Personal tools