Skip to content
Zeni Study
  • Pages
    • Learn Python In 7 Days
      • Day 1 : Variable + if/else
      • Day 2: Loops
      • Day 3 : Array + String
      • Day 4 — Functions
      • Day 5 — Dictionaries - Hashmap
      • Day 6 — Files & Errors
      • Day 7 — Mini Project & Programmer Thinking
    • Machine Coding:
      • Day 1 — Bank account + Wallet :
      • Day 2 : RateLimiter + seat booking
      • Day 3 : Library Management + Classroom Attendance System
      • Day 4 : Bank account and notification system.
      • Day 5 : Key-value and payment processor.
      • Day 6 : Discount engine + Seat booking( in depth)
      • Day 7: Parking lot System :
    • Machine coding extended:
      • Day 7.5 — Parking Lot (Constraint-Heavy Variant)
      • Day 8 : Order + Payment System
      • Day 8 — Extension Round (Mid-Interview Change)
      • Day 9 — Ticket Booking with Expiry (Simulated Time)
      • Day 9 — Extension Round (Seat Lock Ownership + Forced Unlock)
    • SQL + DB Thinking course
      • Day 1 — Tables, Rows & Thinking in Data
      • Day 2 — Relationships & Foreign Keys (Thinking in Connections)
      • Day 3 — Filtering, Aggregation & Answering Data Questions
      • Day 4 — JOINs (Combining Tables the Right Way)
      • Day 5 — Subqueries, EXISTS & NOT EXISTS (Thinking in Layers)
      • Day 6 — Indexes, Constraints & How Databases Think
      • Day 7 — Full SQL Interview Simulation (SDE-1 Ready)
      • Extended Day 1 — Core Business Systems (Deep Practice)
      • Extended Day 2 — Booking & Platform Systems (High-Depth Practice)
      • Extended Day 3 — Content & Learning Platforms (Capstone Practice)
    • LLD: Java
      • DAY 1 — Core Foundations (SDE-2 Level)
      • DAY 2 — State, Time & Domain Correctness
      • DAY 3 — Extensibility & Failure Handling (SDE-2 Core Signal)
      • DAY 4 — Concurrency, Scheduling & Consistency (SDE-2 Critical)
      • DAY 5 — Workflow Design & Config-Driven Systems (SDE-2+)
      • DAY 6 — Eventing & Usage-Based Systems (Advanced SDE-2)
      • DAY 7 — Interview Simulation (Hard, Production-Grade)
      • icon picker
        Hidden Edge Cases Interviewers Expect (Day-wise)
      • Detailed Testing file:
    • Assignment:
      • If else Practice Set

Hidden Edge Cases Interviewers Expect (Day-wise)

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
limit = 0 or window = 0
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?
TTL = 0 or negative
Concurrent get/put
Memory leak from expired keys
Clock precision
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
Confirm called twice
Hold expires while confirming
Hold ID is invalid
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
Concurrent debit calls
Transaction list mutability
Ordering of transactions
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
Order of rule execution
Two conflicting discounts
Adding new discount without changing engine
Floating-point precision
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)
Infinite retry loop
Channel order change
Retry count per channel or global?
Blocking calls
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
Negative stock input
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
Payment called twice
Fulfillment before payment
Retry payment after failure?
Order creation duplicate ID
Idempotency
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
Hash collisions
UserId is null
Verbal Trap
“Why not random() < rollout?”
Correct
“Random breaks determinism — users would flicker.”

🔴 Day 6 — Async & Aggregation

1️⃣1️⃣ Event Bus

Hidden Edge Cases
Handler throws exception
Slow handler blocking others
Publish with no subscribers
Subscribe during publish
Ordering guarantees?
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
Floating-point rounding
Tier change mid-month
Overflow in counters
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 execution order
Rule state shared across users
Rolling window memory cleanup
Time boundary conditions
Thread safety
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?)
Backoff overflow
Thread leaks
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
Mention others verbally

If Time Runs Out

“I’d add safeguards for X, Y, Z as discussed.”
That alone boosts evaluation.

🏁 Final Truth

Most candidates:
Code happy path
Ignore verbal edge cases
Strong candidates:
Surface edge cases proactively
Encode invariants
Defend design verbally
You’re now training like the top 10–15%.

 
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.