[Based on a problem by Emily Moore. Reworded by Sam Rebelsky.]
Twenty-five french fries are arranged in a five-by-five grid. A fly lands on one randomly chosen french fry and tries to reach every french fry exactly once. For some reason, the grease on the french fries limits the directions in which the fly can move, so that it can only move to a french fry in an adjacent row or column.
Is it always possible for the fly to reach every fry? If not, suggest a counterexample. If so, come up with an algorithm.
How does your answer change for different grid sizes?