ROUND 1: Pattern Recognition (Easy)
Q1
Restaurant orders "pasta carbonara" → kitchen makes it. Which pattern?
A) Strategy 🔄
B) Observer 📢
C) ✓ Factory 🏭
D) Singleton ⭐
Request by name, factory creates it
Q2
Drive to work: Monday-highway, Tuesday-scenic, Friday-bike. Same goal, different methods?
A) ✓ Strategy 🔄
B) Factory 🏭
C) Observer 📢
D) Singleton ⭐
Switching approaches for same destination
Q3
YouTuber uploads → you get phone alert, email, TV update all at once?
A) Factory 🏭
B) Strategy 🔄
C) ✓ Observer 📢
D) Singleton ⭐
One event notifies multiple subscribers
Q4
Company has ONE CEO, everyone refers to same person. No multiple CEOs?
A) Factory 🏭
B) Observer 📢
C) Strategy 🔄
D) ✓ Singleton ⭐
Exactly one shared instance
ROUND 2: Scenarios (Medium)
Q5
Fire alarm detects smoke → all alarms ring, sprinklers activate, 911 called?
A) Factory 🏭
B) ✓ Observer 📢
C) Strategy 🔄
D) Singleton ⭐
One trigger notifies all systems
Q6
GPS offers: Fastest (25min), Scenic (40min), Avoid Tolls (35min). Switch anytime?
A) ✓ Strategy 🔄
B) Factory 🏭
C) Observer 📢
D) Singleton ⭐
Multiple algorithms, swap at runtime
Q7
House has ONE thermostat controlling all rooms. Everyone sees same temp?
A) Factory 🏭
B) Observer 📢
C) Strategy 🔄
D) ✓ Singleton ⭐
One shared instance everyone accesses
Q8
Starbucks makes latte, cappuccino, americano. Order by name, they create it?
A) ✓ Factory 🏭
B) Strategy 🔄
C) Observer 📢
D) Singleton ⭐
Different types created based on request
ROUND 3: When NOT to Use (Hard)
Q9
When should you AVOID Singleton?
A) Need exactly one instance
B) Multiple parts need same data
C) ✓ Might need multiple instances later
D) Want centralized control
Locks you into one - avoid if flexibility needed
Q10
When should you AVOID Factory?
A) Have 10+ types to create
B) ✓ Only one simple type to create
C) Creation logic is complex
D) Want to add types easily
Over-engineering - just create directly
Q11
When should you AVOID Strategy?
A) Multiple algorithms exist
B) Need to switch at runtime
C) ✓ Only one approach, won't change
D) Want to avoid if/else
No need for interchangeable strategies
Q12
When should you AVOID Observer?
A) One event affects many
B) ✓ Only one object needs notification
C) Want loose coupling
D) Listeners join/leave
Just call directly - unnecessary complexity
ROUND 4: Combos (Expert)
Q13
Netflix creates different recommendation engines, switches based on user context. Two patterns?
A) ✓ Factory + Strategy
B) Observer + Singleton
C) Factory + Observer
D) Strategy + Singleton
Factory creates engines, Strategy switches
Q14
Smart home: ONE hub everyone uses. Motion detected notifies lights, cameras, locks?
A) Factory + Strategy
B) ✓ Singleton + Observer
C) Factory + Observer
D) Strategy + Singleton
Singleton hub, Observer for notifications
Q15
Payment system: Factory creates processors (card, PayPal, Bitcoin). Strategy selects based on preference?
A) Observer + Singleton
B) ✓ Factory + Strategy
C) Factory + Observer
D) All four patterns
Factory creates types, Strategy chooses
ROUND 5: Real Problems (Application)
Q16
Problem: 500-line function with 20 if/else creating different object types?
A) ✓ Factory 🏭
B) Strategy 🔄
C) Observer 📢
D) Singleton ⭐
Factory eliminates if/else chains
Q17
Problem: Calculate shipping - Economy, Express, Overnight. Users switch frequently?
A) Factory 🏭
B) ✓ Strategy 🔄
C) Observer 📢
D) Singleton ⭐
Different algorithms that can swap
Q18
Problem: ML model finishes training → update dashboard, send email, log, trigger deploy?
A) Factory 🏭
B) Strategy 🔄
C) ✓ Observer 📢
D) Singleton ⭐
One event triggers multiple actions
Q19
Problem: App settings scattered. Different parts have different values for same setting?
A) Factory 🏭
B) Strategy 🔄
C) Observer 📢
D) ✓ Singleton ⭐
One shared instance ensures consistency
Q20
Problem: Adding new feature (drinks to food app) was super easy. What pattern enabled this?
A) ✓ Factory 🏭
B) Strategy 🔄
C) Observer 📢
D) Singleton ⭐
Good Factory makes adding types simple