Jane Street logoJane Street
System DesignMembers

Snake Game Engine with Apple Pathfinding

Members only

Model the classic Snake game as a clean state machine on a rectangular grid, then extend it with a way to steer toward food. The discussion centres on picking data structures that match the per-move access pattern and on the subtle edge cases in collision handling.

SWE
medium
game-engine
object-design
queue
set
bfs
grid
simulation
Frequency
Single report
Last asked
—
Stage
phone-screen

Members get

  • Full problem statement
  • 3 progressive hints
  • Step-by-step approach
  • Full solution with code
  • 6 common pitfalls
  • 6 talking points
  • 5 follow-up questions with answer directions
  • Preparation drills

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...