Robot Eats Candies on a Grid

Asked at Snowflake · Coding Questions · Difficulty: Medium · Last asked Mar 28, 2026

A robot stands on a rectangular board that has candies on some of its cells. Build a `RobotGame` class that can either eat every candy on its own, always going to the closest one next, or take single steps under a player's control. The autonomous mode reports how many steps the robot walked.

Loading the problem…