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.
- Clarify the input/output model for a console interface before designing classes — how does a move get submitted, and how is state displayed back?
- Explicitly design for unit tests and exception handling (invalid moves, self-collision, boundary conditions) — interviewers have specifically dinged candidates here even when the core design was otherwise solid.
- Think about how you'd extend this if the growth rule changed (e.g. the snake grows by a variable amount depending on what it eats) without reworking the core classes.
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

