Excellent choice.
These are the “spoken edge cases” interviewers don’t write, but expect you to ask about or handle. Missing these is what usually differentiates average SDE-2 from strong SDE-2 / SDE-3.
Below is a problem-by-problem hidden edge-case checklist you should mentally scan during interviews.
🔍 Hidden Edge Cases Interviewers Expect (Day-wise)
🟢 Day 1 — Foundations
1️⃣ Rate Limiter (Sliding Window)
Hidden Edge Cases
Multiple requests at the exact same millisecond Clock skew / time jumps (system time moves backward?) Memory growth for inactive users Thread safety under same user, concurrent requests Verbal Follow-ups Interviewers Ask
“How would you clean old users?” “What if this runs for weeks?” “What if allowRequest is called concurrently?” Strong Signal
“I’d lazily clean expired timestamps and optionally evict inactive users.”
2️⃣ Key-Value Store with TTL
Hidden Edge Cases
Overwriting a key resets TTL? Memory leak from expired keys Verbal Trap
“Should expired keys still occupy memory?”
Correct Answer
“No, expired keys should be removed lazily or via cleanup.”
🟡 Day 2 — State & Invariants
3️⃣ Seat Hold & Reservation
Hidden Edge Cases
Hold expires while confirming Same user holds multiple seats Seat released after expiry Verbal Follow-up
“What if confirm comes exactly at expiry time?”
Strong Answer
“Define expiry strictly (≤ expiry invalid) and enforce consistently.”
4️⃣ Wallet & Transaction Ledger
Hidden Edge Cases
Credit or debit with negative amount Integer overflow on balance Transaction list mutability Verbal Trap
“What if two debits come at same time?”
Expected
Synchronization / atomicity explanation.
🟠 Day 3 — Extensibility & Failures
5️⃣ Discount Engine
Hidden Edge Cases
Discount makes price negative Two conflicting discounts Adding new discount without changing engine Verbal Follow-up
“What if tomorrow we add loyalty points discount?”
Correct Signal
“Just implement another DiscountRule — no engine change.”
6️⃣ Notification Dispatcher
Hidden Edge Cases
Partial success (Email fails, SMS succeeds) Retry count per channel or global? Verbal Trap
“What if all channels fail?”
Expected
Return false + logging + metrics.
🔵 Day 4 — Concurrency
7️⃣ Task Scheduler
Hidden Edge Cases
Schedule same taskId twice Cancel while task is executing Task scheduled in the past Executor thread exhaustion Memory leak of completed tasks Verbal Follow-up
“What happens if schedule() is called with past timestamp?”
Good Answer
“Execute immediately or reject — define contract clearly.”
8️⃣ Inventory Manager
Hidden Edge Cases
Reserve more than available Release more than reserved Concurrent reserve + release Lock granularity per product vs global Verbal Trap
“Why not just synchronize everything?”
Expected
Trade-off explanation (scalability vs simplicity).
🟣 Day 5 — Workflow & Config
9️⃣ Order Processing Pipeline
Hidden Edge Cases
Fulfillment before payment Retry payment after failure? Order creation duplicate ID Verbal Follow-up
“Can we retry payment?”
Strong Answer
“Yes, but only from CREATED, not terminal states.”
🔟 Feature Flag System
Hidden Edge Cases
rolloutPercentage < 0 or > 100 Feature recreated (overwrite?) Determinism across deployments Verbal Trap
“Why not random() < rollout?”
Correct
“Random breaks determinism — users would flicker.”
🔴 Day 6 — Async & Aggregation
1️⃣1️⃣ Event Bus
Hidden Edge Cases
Slow handler blocking others Publish with no subscribers Verbal Follow-up
“Should one bad handler stop others?”
Expected
“No — isolate handler failures.”
1️⃣2️⃣ Billing System
Hidden Edge Cases
Usage before customer added Reset during concurrent usage Verbal Trap
“What if tier changes mid-cycle?”
Good Answer
“Either prorate or apply from next cycle — clarify.”
⚫ Day 7 — Interview Killers
1️⃣3️⃣ Payment Rule Engine
Hidden Edge Cases
Rule state shared across users Rolling window memory cleanup Verbal Follow-up
“How would you add a new fraud rule?”
Correct Signal
“Implement Rule interface — engine unchanged.”
1️⃣4️⃣ Retry Queue + DLQ
Hidden Edge Cases
Task succeeds after retries started Duplicate task submission JVM restart (persistence?) Verbal Trap
“What if task succeeds on retry #2?”
Expected
Stop retrying immediately, never DLQ.
🧠 How to Use This in Interviews (Very Important)
Before Coding (Say This)
“Let me clarify edge cases like concurrency, retries, and invalid inputs.”
While Coding
Handle at least 2–3 hidden cases explicitly If Time Runs Out
“I’d add safeguards for X, Y, Z as discussed.”
That alone boosts evaluation.
🏁 Final Truth
Most candidates:
Strong candidates:
Surface edge cases proactively You’re now training like the top 10–15%.