Bird
0
0
LLDsystem_design~20 mins

Extensibility (NxN board, multiple players) in LLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Extensibility Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Designing a scalable NxN board for multiple players

You are tasked with designing the architecture for a game that supports an NxN board and multiple players. Which architectural component is MOST important to ensure the system can easily scale to larger boards and more players?

AA monolithic service that handles all game logic and player interactions synchronously.
BA centralized game state manager that holds the entire board and player states in memory.
CA fixed-size board array with hardcoded player slots to optimize performance.
DA modular board component that dynamically allocates cells and supports variable dimensions with event-driven updates.
Attempts:
2 left
💡 Hint

Think about flexibility and how the system can adapt to different board sizes and player counts without major rewrites.

scaling
intermediate
2:00remaining
Handling player actions in a multi-player NxN board game

In a multi-player NxN board game, what is the BEST approach to handle concurrent player actions to maintain consistency and responsiveness?

AIgnore conflicts and let the last action overwrite previous ones.
BUse optimistic concurrency control with versioning and conflict resolution on the game state.
CLock the entire board for each player action to ensure no conflicts occur.
DProcess all player actions sequentially in a single thread to avoid conflicts.
Attempts:
2 left
💡 Hint

Consider how to allow multiple players to act simultaneously without blocking or losing data.

tradeoff
advanced
2:00remaining
Tradeoffs in storing NxN board state for multiple players

Which storage approach balances performance and extensibility best for saving the state of an NxN board game with multiple players?

AStore only player moves as events in an append-only log and reconstruct board state on demand.
BStore the entire board state as a single JSON blob in a relational database.
CStore each cell's state as a separate record with player references in a NoSQL database.
DStore board state in memory only and persist snapshots periodically to disk.
Attempts:
2 left
💡 Hint

Think about how to efficiently save changes and allow flexible replay or rollback.

🧠 Conceptual
advanced
2:00remaining
Extending game rules for multiple players on NxN board

When extending a two-player NxN board game to support multiple players with different win conditions, which design principle is MOST important?

AHardcode all possible win conditions in the main game logic for quick access.
BAllow only one universal win condition to simplify the game rules.
CUse a strategy pattern to encapsulate different win condition algorithms and select dynamically.
DImplement win conditions as global variables accessible by all components.
Attempts:
2 left
💡 Hint

Consider how to add or change rules without modifying core logic.

estimation
expert
2:00remaining
Estimating capacity for a multi-player NxN board game service

You are designing a cloud service to support a multi-player NxN board game. Each game has up to 10 players and a board size up to 100x100. Estimate the approximate memory needed to hold 10,000 concurrent games in memory, assuming each cell stores 1 byte and each player state requires 1 KB.

AApproximately 1 GB
BApproximately 100 GB
CApproximately 10 GB
DApproximately 500 MB
Attempts:
2 left
💡 Hint

Calculate memory per game first, then multiply by number of games.