Bird
Raised Fist0
LLDsystem_design~20 mins

Requirements and game rules in LLD - Practice Problems & Coding Challenges

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Challenge - 5 Problems
🎖️
System Design Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Functional Requirements
Which of the following best describes a functional requirement in system design?
AA description of the user interface colors and fonts.
BA description of the system's hardware and software environment.
CA list of constraints like budget and deadlines.
DA description of what the system should do, such as features and behaviors.
Attempts:
2 left
💡 Hint
Think about what the system must perform or provide.
Architecture
intermediate
2:00remaining
Choosing the Right Architecture Style
You need to design a system that supports many users simultaneously and can be updated without downtime. Which architecture style fits best?
ALayered architecture with tightly coupled layers.
BMonolithic architecture with a single deployable unit.
CMicroservices architecture with independent deployable services.
DClient-server architecture with a single server handling all requests.
Attempts:
2 left
💡 Hint
Consider scalability and independent updates.
scaling
advanced
3:00remaining
Scaling a Real-Time Chat Application
Your chat app must handle millions of users sending messages simultaneously. Which approach best supports this scale?
AImplement horizontal scaling with multiple stateless servers and message queues.
BStore messages only on client devices to reduce server load.
CUse a single database server to store all messages.
DUse a monolithic server with vertical scaling (more CPU and RAM).
Attempts:
2 left
💡 Hint
Think about distributing load and handling many simultaneous connections.
tradeoff
advanced
2:30remaining
Tradeoffs in Consistency Models
In a distributed system, choosing eventual consistency over strong consistency means:
AData is always immediately consistent across all nodes.
BData may be temporarily inconsistent but improves availability and performance.
CThe system cannot handle network partitions.
DUsers will never see stale data.
Attempts:
2 left
💡 Hint
Consider availability and performance tradeoffs.
estimation
expert
3:00remaining
Estimating Storage for a Video Streaming Service
You design a video streaming service storing 1 million videos averaging 500MB each. How much storage is needed to store all videos with 3 copies for redundancy?
AApproximately 1.5 petabytes (PB)
BApproximately 500 terabytes (TB)
CApproximately 150 terabytes (TB)
DApproximately 3 petabytes (PB)
Attempts:
2 left
💡 Hint
Calculate total size then multiply by number of copies.

Practice

(1/5)
1. What is the main purpose of requirements in game design?
easy
A. To describe what the game must do
B. To explain how players should play
C. To decide the game's graphics style
D. To set the game's price

Solution

  1. Step 1: Understand the role of requirements

    Requirements define the features and functions the game must have to work properly.
  2. Step 2: Differentiate from rules

    Rules tell players how to play, not what the game must do technically.
  3. Final Answer:

    To describe what the game must do -> Option A
  4. Quick Check:

    Requirements = what game must do [OK]
Hint: Requirements = what game must do, rules = how to play [OK]
Common Mistakes:
  • Confusing requirements with rules
  • Thinking requirements set player behavior
  • Mixing technical needs with gameplay instructions
2. Which of the following is a correct way to write a game rule?
easy
A. The game must load in under 5 seconds
B. Players must collect 10 coins to win
C. Use a database to store player scores
D. The game engine should support 3D graphics

Solution

  1. Step 1: Identify what a game rule is

    A game rule tells players what they must or must not do during play.
  2. Step 2: Check each option

    Players must collect 10 coins to win is a player instruction (rule). Options B, C, D are technical requirements.
  3. Final Answer:

    Players must collect 10 coins to win -> Option B
  4. Quick Check:

    Rules = player instructions [OK]
Hint: Rules tell players what to do, not technical details [OK]
Common Mistakes:
  • Confusing technical requirements with rules
  • Writing rules as system features
  • Ignoring player actions in rules
3. Given these statements, which one is a requirement rather than a rule?
1. Players can jump over obstacles.
2. The game must save progress automatically.
3. Players lose a life if they touch spikes.
4. The game ends after 3 levels.
medium
A. The game must save progress automatically
B. Players lose a life if they touch spikes
C. Players can jump over obstacles
D. The game ends after 3 levels

Solution

  1. Step 1: Identify requirements vs rules

    Requirements describe system features; rules describe player actions and consequences.
  2. Step 2: Analyze each statement

    Statement 2 is a system feature (requirement). Others describe player actions (rules).
  3. Final Answer:

    The game must save progress automatically -> Option A
  4. Quick Check:

    Requirement = system feature [OK]
Hint: Requirements = system features; rules = player actions [OK]
Common Mistakes:
  • Mixing player actions with system features
  • Choosing rules as requirements
  • Ignoring automatic system behaviors
4. A game designer wrote this rule: Players must collect 5 coins to win. But players can win without coins. What is the likely problem?
medium
A. The game has too many levels
B. The requirement is missing
C. The rule is not enforced in the game logic
D. The game has a syntax error

Solution

  1. Step 1: Understand the problem

    The rule says players must collect coins, but they can win without doing so.
  2. Step 2: Identify cause

    This means the game logic does not enforce the rule properly.
  3. Final Answer:

    The rule is not enforced in the game logic -> Option C
  4. Quick Check:

    Rule enforcement = game logic implementation [OK]
Hint: If rule ignored, check game logic enforcement [OK]
Common Mistakes:
  • Confusing missing requirement with rule enforcement
  • Assuming syntax error causes rule failure
  • Ignoring game logic role
5. You want to design a fair multiplayer game. Which combination best ensures fairness and fun?
hard
A. Flexible rules with no system requirements
B. Complex rules that confuse players and minimal system requirements
C. No rules but strict technical requirements
D. Clear rules for player actions and balanced requirements for system performance

Solution

  1. Step 1: Define fairness and fun

    Fairness needs clear rules; fun needs smooth system performance (requirements).
  2. Step 2: Evaluate options

    Clear rules for player actions and balanced requirements for system performance combines clear player rules and balanced system needs, ensuring fairness and fun.
  3. Final Answer:

    Clear rules for player actions and balanced requirements for system performance -> Option D
  4. Quick Check:

    Fairness + fun = clear rules + balanced requirements [OK]
Hint: Fair game = clear rules + balanced system needs [OK]
Common Mistakes:
  • Choosing complex or missing rules
  • Ignoring system performance impact
  • Separating rules from requirements