Back to Notes

Interview Prep Hub

Interview Prep Hub

Aggregated technical templates + behavioral stories for interview prep. LLM: update when new patterns added, SD problems completed, or behavioral stories refined.

Plan window: May 11 → Nov 11, 2026. Live progress: [[Coach/project_current_week]] · [[Coach/project_dsa_sd_curriculum]]


Single-track focus (revised May 11, 2026)

In scope: DSA + System Design + Behavioral + Applications. Everything else deprioritized — see [[synthesis/Job Switch Hub]] kill list.


Round Types & What to Expect

RoundFormatWho tests itYour prep status
DSA / Coding2 LeetCode medium in 45 min, PythonEveryone5/13 patterns done (Arrays/Hash, 2P, Sliding Window, Stack, Binary Search) — W1 validation gate May 11–17
System Design HLD45 min open-ended, whiteboardSenior roles everywhere0/15 interview-ready — start W6 (Jun 15–21)
BehavioralSTAR, leadership, conflictAll rounds4 stories drafted (AskTGE, WebSocket geo, ML thresholding, Service Insights) — drill in W1
SQL2-3 queries: joins, window functions, CTEsFintech (Razorpay, PhonePe, Juspay)✅ Done — maintenance only
Domain (AI/ML)RAG, LLM systems, vector DBsAI startups (Sarvam, Krutrim)AskTGE experience covers this
LLD / Machine Coding1-2 hr, design a class/feature in PythonMost product companiesDeprioritized — covered via SD problems
Frontend Machine CodingImplement UI component/featureFull-stack / FE rolesPractical exp, study only if specifically asked

Prep Priority Map (revised)

Primary track (active prep)

1. DSA patterns        → Python, NeetCode 150 + revision pass by W22
2. System Design HLD   → 15 problems interview-ready by W20
3. Behavioral          → 4 STAR stories drilled to fluency by W4
4. Applications        → Referral DMs W3+, cold apps from W5

Background / on-demand (don't dedicate prep blocks)

5. SQL                  → Done; refresh only if asked in screen
6. API Design           → Verbal review pre-onsite, no dedicated weeks
7. Python internals     → Verbal review pre-onsite, no dedicated weeks
8. AI/RAG domain        → AskTGE war story covers it

Only if specifically asked / role-specific

9.  LLD / Machine Coding → JS interview cards covered; deeper drill only post-screen
10. Frontend internals (JS / React / TS) → study only if FE-heavy role surfaces
11. Frontend SD         → only if FE-heavy role surfaces
12. FastAPI internals   → war story has it; no dedicated week

DSA — Pattern Frequency Map

PatternFrequencyKey ProblemsStatusNotes
Arrays & Hashing★★★★★Two sum, group anagrams, top-k frequent✅ (W1 validation)[[DSA/Data Structures/Hash Map]]
Two Pointers★★★★★3Sum, container water, trapping rain✅ (W1 validation)[[DSA/DSA Techniques for Interviews/Two Pointers]]
Sliding Window★★★★★Longest substring, max sum subarray✅ (W1 validation)[[DSA/DSA Techniques for Interviews/Sliding Window]]
Stack (monotonic)★★★☆☆Next greater element, daily temps, largest rectangle✅ (W1 validation)[[DSA/DSA Techniques for Interviews/Stacks]]
Binary Search★★★★☆Search rotated, find minimum, koko bananas✅ (W1 validation)[[DSA/DSA Techniques for Interviews/Binary Search]]
Linked Lists★★★★☆Merge k sorted, cycle, reverse⬜ W2[[DSA/DSA Techniques for Interviews/Linked Lists]]
Trees (DFS/BFS)★★★★★Path sum, LCA, serialize, level order⬜ W3–W4[[DSA/DSA Techniques for Interviews/Trees]]
Tries★★★☆☆Word search II, autocomplete⬜ W5[[DSA/DSA Techniques for Interviews/Tries]]
Heap★★★★☆Kth largest, merge k lists, task scheduler⬜ W5–W6[[DSA/DSA Techniques for Interviews/Heap & Priority Queue]]
Backtracking★★★☆☆Subsets, permutations, word search⬜ W6–W7[[DSA/DSA Techniques for Interviews/Backtracking]]
Graphs (BFS/DFS + Adv)★★★★★Islands, course schedule, Dijkstra⬜ W7–W8[[DSA/DSA Techniques for Interviews/Graphs]]
Dynamic Programming (1-D + 2-D)★★★★★Coin change, LCS, edit distance, knapsack⬜ W9–W12[[DSA/DSA Techniques for Interviews/Dynamic Programming]]
Greedy★★★☆☆Jump game, gas station, interval scheduling⬜ W13
Intervals★★★☆☆Merge intervals, meeting rooms II⬜ W14
Math & Geometry★★☆☆☆Rotate image, spiral matrix, pow(x,n)⬜ W15
Bit Manipulation★★☆☆☆Single number, counting bits, missing num⬜ W16

Target: NeetCode 150 done by W16 (Aug 30) + revision pass by W22 (Oct 11).


SQL — Interview Level (✅ DONE — maintenance only)

Tested heavily at: Razorpay, PhonePe, Juspay, Zepto (fintech companies). Refresh templates below before any fintech screen.

Must Know

-- Joins: know when to use each
INNER JOIN   -- only matching rows both sides
LEFT JOIN    -- all left, matching right (nulls for no match)
RIGHT JOIN   -- all right, matching left
FULL OUTER   -- all rows both sides

-- GROUP BY vs WHERE
WHERE  → filters BEFORE aggregation
HAVING → filters AFTER aggregation (on aggregated values)

-- CTEs (Common Table Expressions)
WITH recent_orders AS (
  SELECT user_id, COUNT(*) as cnt FROM orders
  WHERE created_at > NOW() - INTERVAL '30 days'
  GROUP BY user_id
)
SELECT * FROM recent_orders WHERE cnt > 5;

-- Window functions — come up constantly in senior interviews
ROW_NUMBER() OVER (PARTITION BY dept ORDER BY salary DESC)
RANK()        -- gaps on ties
DENSE_RANK()  -- no gaps on ties
LAG(salary, 1) OVER (ORDER BY date)   -- previous row value
LEAD(salary, 1) OVER (ORDER BY date)  -- next row value
SUM() OVER (PARTITION BY dept)        -- running totals

-- Subquery vs JOIN — know when each is cleaner
-- Indexes: B-tree default, composite index column order matters
-- EXPLAIN plan: seq scan vs index scan
-- N+1 problem: detect with EXPLAIN, fix with JOIN or batch load

Practice

  • DataLemur (concept + company-tagged) → LeetCode SQL 50 (volume)
  • Target: write medium-complexity queries without reference in 5 min

Interview Questions to Prepare Verbally

  • "What's the difference between WHERE and HAVING?"
  • "When would you use a CTE vs subquery?"
  • "What is a composite index and why does column order matter?"
  • "How do you find the second highest salary?" (classic — DENSE_RANK or subquery)
  • "What is the N+1 problem and how do you fix it?"

FastAPI — Interview Level

What "interview ready" means: can design + explain a complete API from scratch.

# Async endpoint + Pydantic model
@app.post("/items", response_model=ItemOut)
async def create_item(item: ItemIn, db: AsyncSession = Depends(get_db)):
    ...

# Dependency injection — explain this clearly
def get_current_user(token: str = Depends(oauth2_scheme)) -> User:
    ...  # decode JWT, raise 401 if invalid

# Middleware
@app.middleware("http")
async def log_requests(request: Request, call_next):
    start = time.time()
    response = await call_next(request)
    # add latency header
    return response

# Background task (non-blocking)
@app.post("/send-email")
async def send(bg: BackgroundTasks, payload: EmailPayload):
    bg.add_task(send_email_async, payload.to, payload.body)
    return {"status": "queued"}

# Lifespan (replaces @app.on_event)
@asynccontextmanager
async def lifespan(app: FastAPI):
    await db.connect()    # startup
    yield
    await db.disconnect() # shutdown

Interview question: "How does FastAPI handle sync vs async routes?" → Async routes run on event loop. Sync routes run in a thread pool (via run_in_executor) to avoid blocking. Don't mix blocking I/O inside async routes.

See: [[Python/Libraries/FastAPI]]


LLD / Machine Coding (deprioritized — review only if asked)

Product companies test this. Python OOP + design patterns. Not a dedicated prep week in revised plan — review the 5 templates below pre-screen if the company posts LLD-specific questions.

Python LLD prep

# Know these patterns cold:
from abc import ABC, abstractmethod

class PaymentProcessor(ABC):
    @abstractmethod
    def process(self, amount: float) -> bool: ...

class StripeProcessor(PaymentProcessor):
    def process(self, amount: float) -> bool:
        ...  # concrete impl

5 Problems to Cover

ProblemKey conceptDifficulty
LRU CacheO(1) get/put via OrderedDict or DLL + hashmapMedium
Rate Limiter (class)Token bucket, thread-safe with LockMedium
Parking LotOOP, multiple vehicle types, spot allocationMedium
SplitwiseDebt simplification, graph reductionHard
Event EmitterPub/sub with typed subscribers, weak refsMedium

SOLID principles (verbal):

  • S — one reason to change
  • O — extend without modifying
  • L — subclass replaceable for base
  • I — don't force unused interface methods
  • D — depend on abstractions, not concrete classes

System Design — 15 Problems (Target W6–W20)

Interview level = whiteboard from scratch in 45 min with trade-off discussion.

#ProblemTarget wkNotes pageStatusKey concepts
1URL ShortenerW6[[System Design/Problem Designs/Design a URL shortener]]base62, consistent hashing, CDN, 301 vs 302
2Rate LimiterW7[[System Design/Problem Designs/Rate Limiter]]token bucket vs leaky bucket, Redis Lua atomicity
3PastebinW8storage, expiry, CDN, syntax highlighting
4Twitter FeedW9fan-out at scale, timeline gen, hot users
5WhatsApp / ChatW10WebSocket, message ordering, delivery guarantees (your geo war story edge)
6Uber / YelpW11[[System Design/Problem Designs/Uber & Ride Sharing]]geohash/quadtree, driver matching, ETA
7Search AutocompleteW12trie, inverted index, ranking
8Dropbox / Google DriveW13object storage, chunking, dedup
9Distributed Key-Value StoreW14leader election, consistent hashing, replication, ZooKeeper
10Notification SystemW15[[System Design/Problem Designs/Notification System]]fan-out, Kafka, idempotency, DLQ
11Web CrawlerW16politeness, distributed queue, duplicate detection
12Ticketmaster / BookingW17inventory hold, race conditions, seat locking
13YouTube / Netflix streamingW18video ingest, transcoding, CDN, adaptive bitrate
14Instagram / news feedW19timeline gen, image pipeline, hot user shard
15Ad click aggregator / metricsW20streaming agg, late events, dedup, exactly-once

RAG & LLM = covered via AskTGE war story (separate from SD list). API Gateway = covered via JWT auth + circuit breaker concepts in URL Shortener / Rate Limiter deep dives.

Mark ⬜ → ✅ only after: can explain all key concepts cold + survive 10 min of follow-up questions.

Mark ⬜ → ✅ only after: can explain all key concepts cold + survived 10 min of follow-up questions.

Real interview patterns (10+ companies): — [[Real Interview SD Questions]]

  • Push-based systems (WebSockets, notifications, fan-out) appear in 3/10 real interviews — prep this
  • Domain-specific problems are norm — research company's product before interview
  • LLD (class diagram) catches candidates off guard — Glovo had 30min UML phase
  • Ask tooling upfront: "What tool for design? Excalidraw vs Google Doc?"
  • Problems you won't find on YouTube: pagination depth, saved-search notifications, subscription payments, cross-DC replication

L7 signals that separate Senior from Staff:

  • State the cost of every component you add (latency, dollar, ops)
  • Mention hot key problem proactively for any read-heavy system with viral/skewed traffic
  • Defend cache with hit rate math, not just "cache = fast"
  • Flip to failure-first: "How does this break?" — state inconsistency during failover, cache cold start, key generator SPOF
  • Say "we don't need X yet" when numbers don't justify it — brave answer, impressive at senior level

See: [[System Design/Senior SD Mindset]] — full L7 mindset page

SD Interview Formula (cold)

  1. Clarify: functional + non-functional requirements, scale numbers
  2. Estimates: QPS, storage, bandwidth (back of envelope)
  3. High-level: components + data flow diagram
  4. Deep dive: 2 hard components (the interesting parts)
  5. Trade-offs: why this choice vs alternatives
  6. Failure modes + monitoring

API Design Principles (3 days)

REST constraints:
- Stateless: no server-side session, JWT in header
- Idempotency: GET/PUT/DELETE idempotent; POST not by default
  → idempotency key header for POST (payment APIs)
- Resource naming: /users/{id}/orders not /getUserOrders

HTTP status codes (must know cold):
200 OK, 201 Created, 204 No Content
400 Bad Request, 401 Unauthorized, 403 Forbidden
404 Not Found, 409 Conflict, 422 Unprocessable Entity
429 Too Many Requests, 500 Internal Server Error, 503 Unavailable

Pagination:
- Offset: simple but slow on large tables (OFFSET 10000 scans 10000 rows)
- Cursor: use last seen ID or timestamp — senior answer, O(1) per page

Versioning: /v1/resource (URL path) or Accept-Version: v2 (header)

Error response: always include { "error": "...", "code": "...", "request_id": "..." }

Python Internals (1 week verbal prep)

QuestionAnswer (2-3 sentences)
What is the GIL?Lock ensuring one thread executes Python bytecode at a time. Fine for I/O-bound (threads release GIL during I/O). Useless for CPU-bound — use multiprocessing.
async/await under the hoodSingle-threaded event loop. Coroutines yield control at await points. No parallelism — concurrent I/O only. Don't put CPU work in async functions.
Context managers__enter__ on enter, __exit__ on exit (even on exception). contextlib.contextmanager with yield. Use for resource cleanup.
Mutable default args gotchadef f(lst=[]) — default evaluated once at definition, shared across calls. Use None + if lst is None: lst = [].
deepcopy vs copycopy.copy = shallow (copies refs to nested objects). copy.deepcopy = recursive copy. Slow on large objects.
@property vs attribute@property = computed getter, clean API without breaking callers. Also allows @x.setter for validation.
__slots__Restrict instance __dict__, reduce memory, faster attribute access. Useful for data-heavy classes.

See: [[Python/Language Core/Python Programming]], [[Python/Libraries/Asyncio]]


Behavioral Stories — STAR Map

Full stories: [[Private/Interview Questions for Project or behaviour/Past Experience Q&A For Interview]]

CompetencyStoryMetric
Performance ownership + AI integrationAskTGE — DynamoDB redesign + new API from scratch + RAG hallucination fixes2s → 200ms
Real-time distributed systemsWebSocket Geospatial Engine (HCLTech)250+ concurrent drivers, sub-second latency
Backend debugging + ML pipelineML-Assisted Thresholding Engine (Crest, Splunk.conf24 speaker)90% search time reduction
Enterprise scale + ML reliabilityService Insights (Crest)False-positive reduction for 700+ enterprise clients
Concurrency decisionParallel vs sequential KPI trainingSequential → parallel, isolated per-KPI failures
Product recognitionSplunk.conf24 — Configuration Assistant talkExternal validation
Quality culture80% test coverage at 2 separate companiesJest + Pytest, CI/CD

Rules:

  • Never publish HCLTech code. War stories only.
  • Frame in terms of business impact, not just technical detail.
  • Quantify where possible.
  • Lead with AskTGE for AI / backend / product roles. Lead with WebSocket geo for distributed systems roles.
  • STAR-drill all 4 main stories 10× each in W1–W2 (May 11–24).

Frontend Machine Coding (for Full-Stack roles)

Your existing notes: [[FrontEnd/Java script/JavaScript Function Code Examples for Interviews]]

Already covered:

  • Debounce (basic + cancel/flush)
  • Throttle
  • Promise.all / allSettled / race / any
  • Currying / infinite currying
  • Array polyfills (map, filter, reduce)
  • Deep clone

Still needed:

  • Memoize function
  • Event emitter (on/off/emit)
  • LRU Cache (JS class, Map-based)
  • Virtual DOM diff (basic)

Pre-Interview Checklist

48 hours before

  • Revise all 10 DSA pattern templates
  • Re-read 3 most recent SD problems
  • Review behavioral stories (especially AskTGE)
  • Research company (product, tech stack, recent news, engineering blog)

Day of

  • Python 3.11+ environment ready
  • Pen + paper for SD diagrams
  • Clarify constraints FIRST before coding
  • Think aloud throughout — interviewers evaluate process

Related

  • [[synthesis/Job Switch Hub]] — timeline, target companies, kill list
  • [[synthesis/Tech Stack Overview]] — positioning guide
  • [[synthesis/Concurrency Deep Dive]] — Go + Python concurrency deep dive
  • [[synthesis/LLM & AI Stack]] — AI company targeting (Sarvam, Krutrim)
  • [[Coach/project_current_week]] — this week's problems + decision gate
  • [[Coach/project_dsa_sd_curriculum]] — full 26-week table
  • [[DSA/DSA Topics]] — DSA index
  • [[System Design/System Design Basics]] — SD fundamentals
  • [[Python/Libraries/FastAPI]] — FastAPI wiki page (background reference only)
  • [[Python/Libraries/Asyncio]] — async internals (background reference only)