PracHub
QuestionsLearningGuidesInterview Prep
|Home/System Design/Nash AI

Design OOD for probabilistic Minesweeper

Last updated: Mar 29, 2026

Quick Overview

Design OOD for probabilistic Minesweeper evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

  • medium
  • Nash AI
  • System Design
  • Software Engineer

Design OOD for probabilistic Minesweeper

Company: Nash AI

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

Design an object-oriented Minesweeper game. The board is a grid of cells. During initialization, each cell is passed a parameter prob indicating the probability that the cell is a mine; explain how these per-cell probabilities are used to generate the initial mine layout and initialize cell states. Define the core classes (e.g., Game, Board, Cell) and their responsibilities, the relationships among them, and the public APIs to (a) print the current board state and (b) process a user click. Specify expected state transitions for a click at a high level (lose on mine, otherwise reveal logic handled by algorithms), handling of invalid or duplicate clicks, and how the design supports maintainability and testing.

Quick Answer: Design OOD for probabilistic Minesweeper evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

Related Interview Questions

  • Design real-time delivery tracking with async updates - Nash AI (medium)
|Home/System Design/Nash AI

Design OOD for probabilistic Minesweeper

Nash AI logo
Nash AI
Jul 26, 2025, 12:00 AM
mediumSoftware EngineerTechnical ScreenSystem Design
6
0

Design OOD for probabilistic Minesweeper

Object-Oriented Design: Minesweeper with Per-Cell Mine Probabilities

Context

Design an object-oriented Minesweeper game. The board is a grid of cells. On initialization, each cell is given a probability prob that it contains a mine. The system should use these probabilities to generate the mine layout and initialize cell states deterministically when needed (for testing) and randomly otherwise.

Assume prob can be provided as either:

  • A single scalar applied to all cells, or
  • A 2D grid of probabilities (same shape as the board).

Requirements

  1. Explain how the per-cell probabilities are used to generate the initial mine layout and initialize cell states.
  2. Define the core classes (e.g., Game, Board, Cell), their responsibilities, relationships, and public APIs to:
    • (a) print the current board state
    • (b) process a user click
  3. Specify expected state transitions for a click at a high level (lose on mine; otherwise reveal logic handled by standard Minesweeper algorithms).
  4. Describe handling of invalid or duplicate clicks.
  5. Explain how the design supports maintainability and testing.

Constraints & Assumptions

  • Preserve the scope, facts, inputs, and requested outputs from the prompt above.
  • If the prompt leaves a detail unspecified, state a reasonable assumption before relying on it.
  • Keep the answer interview-ready: concise enough to present, but concrete enough to implement or evaluate.

Clarifying Questions to Ask Guidance

  • Clarify users, core use cases, read/write patterns, scale, latency, availability, and data retention.
  • State explicit assumptions before making sizing or architecture decisions.
  • Prioritize the functional path first, then address reliability, security, observability, and rollout.

What a Strong Answer Covers Guidance

  • A scoped requirements summary with concrete non-goals and success metrics.
  • API, data model, architecture, consistency, capacity, and operations.
  • Reasoned trade-offs among simple and scalable designs, including bottlenecks and failure modes.
  • A validation, monitoring, migration, and launch plan appropriate for the risk level.

Follow-up Questions Guidance

  • What breaks first at 10x traffic or data volume?
  • How would you degrade gracefully during dependency failures?
  • What metrics and alerts would prove the design is healthy after launch?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Nash AI•More Software Engineer•Nash AI Software Engineer•Nash AI System Design•Software Engineer System Design

Your design canvas — auto-saved

PracHub

Master your tech interviews with 9,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.