Beginner
Tic-Tac-Toe
1. The Setup (Enums and Pieces)
from enum import Enum
# Enum for piece type (Scalable for future piece types)
class PieceType(Enum):
X = 1
O = 2
# Base Class for a Playing Piece
class PlayingPiece:
def __init__(self, piece_type: PieceType):
self.piece_type = piece_type
# Concrete Class for X
class PlayingPieceX(PlayingPiece):
def __init__(self):
super().__init__(PieceType.X)
# Concrete Class for O
class PlayingPieceO(PlayingPiece):
def __init__(self):
super().__init__(PieceType.O)2. The Board
3. The Player
4. The Game Orchestrator (Main Logic)
5. Running the Game
Key Design Highlights for Interviews:

Snake & Ladder Game
1. Requirements Clarification
2. Core Entities (Objects)
3. Class Diagram & Relationships

4. Python Implementation
A. The Jump & Cell Classes
B. The Board
C. The Dice
D. The Player
E. The Game Orchestrator
5. Design Considerations for Interview
1. Why use a Jump class instead of Snake/Ladder subclasses?
Jump class instead of Snake/Ladder subclasses?2. Design Pattern: Strategy Pattern (Dice)
3. Concurrency (Advanced)
4. Code Extensibility (Adding "Skip Turn" or "Extra Turn")
Tetris Game
1. Requirements Clarification
2. Core Entities (Objects)
3. Class Diagram

4. Python Implementation
A. Helper Class (Point)
B. The Tetromino (Piece) Base Class & Factory
C. The Board
D. The Game Orchestrator
5. Key Design Decisions (Interview Talking Points)
Minesweeper
1. Requirements Clarification
2. Core Entities
3. Class Diagram & Relationships

4. Python Implementation
A. The Cell Class
B. The Board Class (The Heavy Lifter)
C. The Game Orchestrator
5. Key Interview Points (The "Why")
1. Algorithm: Flood Fill (BFS vs DFS)
2. Initialization Strategy (Advanced)
3. Separation of Cell State vs Configuration
Chess Game
1. Requirements Clarification
2. Core Entities
3. Class Diagram & Design

4. Python Implementation
A. The Piece Hierarchy
B. The Board and Block
C. The Move and Game Logic
D. The Player
5. Key Complexity Handling (Interview "Gotchas")
1. "Check" and "Checkmate" Validation
2. Special Moves (Castling, En Passant)
3. Pawn Promotion
Alarm/Alert Service for AWS
1. Requirements Clarification
2. Core Entities
3. Class Diagram & Relationships

4. Python Implementation
A. The Basic Data Structures
B. Notification Strategy (Strategy Pattern)
C. The Alarm Logic (State Management)
D. The Orchestrator (Service)
5. Key Design Decisions (Interview Talking Points)
1. Handling Flapping (State Oscillation)
2. Strategy Pattern for Notifications
3. Metric Matching (Scalability)
4. Push vs Pull
Logging Library like log4j
1. Requirements Clarification
2. Core Entities
3. Class Diagram & Relationships

4. Python Implementation
A. Basic Setup (Enum & Message)
B. Layouts (Strategy Pattern)
C. Appenders (Strategy Pattern)
D. The Logger
E. Logger Manager (Singleton/Factory)
5. Key Interview Points
1. Why use the Strategy Pattern?
2. Thread Safety
3. Performance (Lazy Evaluation)
4. Extensibility
JSON Parser
1. Requirements Clarification
2. Core Architecture & Entities
3. Class Diagram

4. Python Implementation
A. The Setup (Tokens)
B. The Lexer (Tokenizer)
C. The Parser (Recursive Descent)
5. Key Interview Points
1. Why Recursive Descent?
2. Handling Ambiguity
3. Error Handling
4. Extensions
File System
1. Requirements Clarification
2. Core Entities
3. Class Diagram & Relationships

4. Python Implementation
A. The Base Component (Abstract Class)
B. The Leaf (File)
C. The Composite (Directory)
D. The Orchestrator (File System)
5. Key Interview Points
1. The Composite Pattern
2. Path Resolution
3. Circular Dependencies
4. Search Functionality
2048
1. Requirements Clarification
2. Core Entities
3. Class Diagram

4. Python Implementation
A. The Tile Class
B. The Board (The Core Algorithm)
C. The Game Controller
5. Key Design Decisions (Interview Talking Points)
1. Matrix Manipulation Strategy
2. Merge Logic (Greedy Approach)
3. Check Game Over
4. Separation of Concerns
Last updated