Code design (LLD) rounds at Atlassian tend to start from an open-ended, everyday-sounding prompt — a game, a scheduling system, a rating system — and interviewers explicitly probe whether you cover unit tests and exception handling, not just whether your class diagram is clean.
Design a system for a Snake game playable over a console interface. The design should track and display the snake's head and tail position as it moves, and be structured to support additional game-state behavior beyond basic movement without a rewrite.
Requirements to clarify first
- How does a move arrive — one direction per tick typed into the console, or a queue of moves replayed in sequence — and does the game tick on its own or only when input arrives?
- What ends the game: hitting the boundary, hitting yourself, or both? And should moving off the edge kill the snake or wrap it around to the opposite side (a variant interviewers have asked for as the scale-up)?
- How does the snake grow — by exactly one segment per food item, or by a variable amount depending on what it eats — and does the board need to place food itself or is food given as input?
More LLD prompts Atlassian has asked recently
The class design, entity list, design-pattern reasoning and follow-up discussion for these — plus the full worked solution above — are part of the Placement-Ready PYQ Kit.
2 more LLD prompts with full class designs in the full Placement-Ready PYQ Kit

