TopCoder: AvoidRoads (250 points)
leetcode: Gray Code