How do you structure a behavioral answer (STAR)?
Situation, Task, Action, Result. Set context briefly, define your responsibility, detail what you did, end with measurable outcome. Keep Action/Result ~60%.
Example S-T-A-R
Career & Behavioral · 7 sections
The behavioral, HR and fundamentals questions that recur across every tech interview loop, including the themes India product companies (Flipkart, Swiggy, Razorpay, PhonePe, Google India) actually ask.
Situation, Task, Action, Result. Set context briefly, define your responsibility, detail what you did, end with measurable outcome. Keep Action/Result ~60%.
Example S-T-A-R
Structure: present role -> key achievements -> why this role/company. Keep 60-90s, tailored to job. End with a hook inviting questions.
Example Present -> Past -> Future (60s)
Connect company mission/product to your skills and growth goals. Show research; avoid generic 'great company'.
Example Mission + skills + growth
Positive framing: seeking growth/impact/scope. Never badmouth employer. Align with target role.
Example Seeking bigger scope/impact
Pick 2-3 strengths with evidence and relevance to role. Use concrete examples, not adjectives.
Example Strength + proof + relevance
Real, non-critical weakness + mitigation + progress. Avoid clichés like 'perfectionism'.
Example Weakness -> action -> progress
Own a real failure with impact. Explain root cause, what changed, prevention. Show accountability and learning.
Example Situation -> failure -> lesson -> change
Quantify impact (metrics, users, revenue, time). Explain your specific contribution and obstacles overcome.
Example Impact metrics + your role
Empathize, seek data, focus on shared goal, escalate if needed. Show willingness to be wrong.
Example Listen -> data -> align -> resolve
Show respect + data-driven pushback + commit once decided. Avoid 'I was right' framing.
Example Disagree respectfully, commit
Show prioritization, trade-offs, communication, and outcome. Highlight what you cut and why.
Example Prioritize -> communicate -> ship
Break problem into assumptions, validate with stakeholders, iterate. Show comfort with incomplete info.
Example Assumptions -> validate -> iterate
Show openness, action taken, measurable improvement. Avoid defensiveness.
Example Listen -> act -> improve
Intrinsic drivers: impact, learning, ownership, collaboration. Tie to role realities.
Example drivers: impact, learning, ownership
Communicate preferences (async/sync, deep work) and adaptability. Show team compatibility.
Example Deep work + collaboration
Be honest about constraints; express flexibility where true. Clarify expectations early.
Example Honest + flexible where possible
Use impact/urgency matrix; align with stakeholders; revisit regularly. Show trade-off decisions.
Example Impact vs urgency
Show proactive identification of problem and solution without being asked. Quantify impact.
Example Proactive + impact
Iterate quickly, gather data, adjust. Show comfort with incremental delivery.
Example Iterate + measure
Document decisions, APIs, and runbooks. Balance with code clarity; keep updated.
Example Docs + runbooks
Testing, code review, CI, monitoring. Balance speed and quality based on risk.
Example Tests + review + CI
Encapsulation, inheritance, polymorphism, abstraction. Encapsulation hides state; inheritance reuses; polymorphism dispatches; abstraction simplifies interfaces.
Example class A { private x; ... }
Asymptotic upper bound on growth as input size n grows. Drop constants and lower-order terms. Use for scalability comparison.
Example O(1), O(log n), O(n), O(n log n), O(n^2)
Extra memory used by algorithm excluding input (auxiliary) or including input. Count dominant structures.
Example aux space vs total space
Process has own address space; thread shares process memory but has own stack/registers. Threads cheaper to create/share data.
Example fork() vs pthread_create()
TCP reliable, ordered, connection-oriented. UDP unreliable, unordered, low overhead. Choose by latency/reliability needs. HTTP/1.1 and HTTP/2 run over TCP; HTTP/3 runs over QUIC (UDP).
Example HTTP/1.1 and HTTP/2 run over TCP; HTTP/3 runs over QUIC (UDP).
SQL relational, ACID, structured schema. NoSQL flexible, horizontally scalable; consistency varies by product. Many NoSQL stores offer strong consistency (DynamoDB strong reads, MongoDB majority); distributed SQL exists (Spanner, CockroachDB). Choose by data shape and scale.
Example Postgres/Spanner vs Mongo/Dynamo
Organize tables to reduce redundancy (1NF/2NF/3NF/BCNF). Improves integrity but may require joins.
Example 1NF atomic, 2NF no partial deps
Data structures (B-tree/hash) speeding reads at write/storage cost. Index columns in WHERE/JOIN/ORDER BY.
Example CREATE INDEX idx ON t(col)
REST resource-oriented, cacheable, multiple endpoints. GraphQL single endpoint, client-shaped queries, avoids over/under-fetching.
Example GET /users vs query { user }
During a network partition you must choose Consistency or Availability. Partition tolerance usually mandatory. Mention PACELC: when no partition, trade latency vs consistency.
Example CP: strong consistency; AP: availability; PACELC
Automatic reclamation of unreachable objects. Trade-offs: throughput vs latency, pauses. Generational heaps common.
Example mark-and-sweep, generational
Objects still reachable (referenced) but no longer needed, e.g. forgotten listeners, unbounded caches; or in manual-memory languages, unreachable memory never freed.
Example remove listeners, bound caches
Mutual exclusion, hold-and-wait, no preemption, circular wait (Coffman). Break any to avoid.
Example lock ordering, timeouts
GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS. 2xx success, 3xx redirect, 4xx client error, 5xx server error. Idempotent: GET/HEAD/OPTIONS/PUT/DELETE. POST and PATCH not idempotent by default.
Example 200, 201, 400, 401, 404, 500
Cache-aside, read-through, write-through, write-back. Eviction: LRU/LFU/TTL. Consider invalidation and staleness.
Example cache-aside + TTL
Client-supplied unique key (e.g. header) ensuring retried requests execute once; server caches the result for a TTL.
Example Idempotency-Key: <uuid>
L1 ~1ns, L2 ~4ns, RAM ~100ns, SSD ~100us, HDD ~10ms, same-DC ~0.5ms, cross-region ~150ms. Use for back-of-envelope estimates.
Example RAM 100ns; SSD 100us; DC 0.5ms
Clarify constraints -> examples -> brute force -> optimize -> code -> test -> complexity. Communicate throughout.
Example Clarify -> brute -> optimize
Constraints determine feasible approaches (n size, value ranges, duplicates). Avoid solving wrong problem.
Example Ask n, ranges, duplicates
Yes, state brute force and its complexity, then optimize. Shows baseline and reasoning.
Example Brute O(n^2) -> optimize O(n)
Discuss both; choose based on constraints. Hash map for time, in-place for space. State trade-off explicitly.
Example Time O(n) space O(n) vs O(n^2) time O(1)
Empty input, single element, duplicates, negatives, zeros, max/min values, sorted/reverse, large n.
Example [], n=1, duplicates, negatives
Dry-run with examples, edge cases, and random small cases. Trace variables; check off-by-one.
Example Trace example step-by-step
Pick small input; track state table; verify loop bounds and termination.
Example Small input + state table
After solution; state time and space. Explain dominant operations. Be precise about amortized.
Example Time O(n), space O(1)
Identify bottleneck; consider better data structures, math, two pointers, DP, divide-and-conquer.
Example Profile bottleneck -> restructure
Meaningful names, small functions, comments for non-obvious logic. Clean code aids interviewer review.
Example clear variable names
After genuine attempt and articulation; ask targeted questions, not 'what's the answer'.
Example I'm stuck on X; can I get a hint?
Restate, try smaller cases, consider related patterns, ask clarifying questions. Don't go silent.
Example Think aloud, smaller cases
Discuss trade-offs (time/space/complexity/implementation). Choose based on constraints and maintainability.
Example Compare Big-O and constants
Scaling, concurrency, persistence, edge cases, alternative approaches, testing. Prepare to extend.
Example How to scale to 10^9?
Clarify requirements -> estimate scale -> high-level design -> deep dive -> bottlenecks -> trade-offs. Communicate choices.
Example Requirements -> scale -> design
Vertical: bigger machine (limits/cost). Horizontal: more machines (complexity). Prefer horizontal for web tiers.
Example Scale out vs scale up
Distributes traffic across servers; algorithms: round-robin, least-connections, consistent hashing. Health checks remove bad nodes.
Example L4/L7 load balancer
Client, CDN, app cache, DB cache. Reduces latency/load; manage invalidation and consistency.
Example Redis/Memcached, TTL
Partition data across DBs by key/range/hash. Improves write scale; adds complexity (joins, rebalancing).
Example Shard by user_id hash
Primary-replica for reads; multi-primary for writes. Trade-offs: lag, conflicts, failover.
Example Async replication lag
Decouple services, absorb spikes, async processing, retries. Kafka/RabbitMQ/SQS. Adds latency/complexity.
Example Kafka for event streaming
DAU * actions/day / 86400 for QPS; storage = records * size * retention * replication. State assumptions. Peak ≈ 2-3× avg.
Example 10M DAU × 10 actions/day ÷ 86,400 ≈ 1,150 QPS avg; peak ≈ 2–3× that.
Match requirements: latency, consistency, scale, team expertise, cost. Avoid resume-driven development.
Example Requirements first
Identify components whose failure breaks system; add redundancy, failover, health checks.
Example Replicate DB, multi-AZ
Protect from abuse/overload using token bucket/leaky bucket/sliding window. Per-user/IP/API key.
Example Token bucket per user
Edge caches for static/dynamic content; reduces latency and origin load. Cache invalidation strategies.
Example CloudFront/Cloudflare
Metrics, logs, traces (three pillars). Alert on SLOs. Essential for operating at scale.
Example Prometheus/Grafana/OTel
Explicitly compare options on latency, cost, complexity, consistency. No single right answer; justify.
Example CAP trade-offs
Keys and nodes on a hash ring; a node change remaps only K/N keys. Virtual nodes improve balance.
Example ring: hash(key) -> node
Focus on skills/impact/leadership growth, not title. Align with company trajectory. Show ambition + realism.
Example Grow into tech lead/IC
Servant/empowering, clear goals, feedback, delegation with trust. Adapt to team maturity.
Example Empower + clear goals
Examples of coaching, code reviews, onboarding. Show growth of mentees and your learning.
Example Mentoring -> mentee growth
Hands-on projects, docs, courses, community. Show structured approach and application.
Example Build -> read -> teach
Prioritize, set boundaries, sustainable pace. Show awareness of burnout prevention.
Example sustainablePace = true
Research market range; give range based on total comp; emphasize fit and flexibility.
Example Range based on market data
Unique value prop: skills + experience + culture fit + impact. Concrete examples.
Example Skills + fit + impact
Ask about team, success metrics, tech stack, challenges, growth. Shows engagement.
Example What defines success in 6 months?
Deep dive into a project you owned end-to-end; highlight decisions and impact.
Example Ownership + impact
Examples of pivoting priorities/tech; show flexibility and learning.
Example Pivot + learn + deliver
Wait for full written offer; research market total comp; negotiate level/base/equity/bonus respectfully; get terms in writing.
Example Total comp + level + written terms
Research values; reflect on preferences (pace, autonomy, collaboration); ask questions in interview.
Example Values alignment
Communication, reliability, shared goals, constructive feedback. Examples of collaboration.
Example Clear comms + reliability
Show async communication, self-management, time zones, documentation. Tools and rituals.
Example Async + documentation
Justify based on collaboration style; show flexibility.
Example Small autonomous teams
Be honest; align with company policy; show adaptability.
Example Hybrid works well
Demonstrate research: users, features, competitors, recent changes. Connect to your skills.
Example Research + user focus
Know top competitors and differentiation. Shows market awareness.
Example Competitor landscape
Mention recent launches/funding/leadership. Shows genuine interest.
Example Recent launch/funding
Connect personal values to mission; concrete examples of similar impact.
Example Mission alignment
Show desire to grow with company; avoid 'stepping stone' framing.
Example Grow with company
Show respect, allyship, inclusive practices in code reviews/team.
Example inclusive: allyship + accessible
Autonomy with support; clear goals; regular feedback. Show adaptability.
Example autonomy + regular 1:1s
Compare product, mission, tech, and culture; cite specific differentiators and how they fit your goals. Avoid generic praise.
Example Differentiators + fit
See Deck 2 #14: reservation with TTL, atomic decrement, queue-based order creation, a waiting room, anti-bot measures. Flipkart LLD rounds also ask for clean classes (Cart, Item, Pricing strategy) in 90 minutes. (Hard)
Reserve (TTL) -> atomic decrement -> queue order creation -> waiting room -> anti-bot
HashMap key → node + doubly linked list (most recent at head). get moves the node to the head; put inserts at the head and evicts the tail when over capacity. In Java you can use `LinkedHashMap(cap, 0.75f, true)` with `removeEldestEntry`. (Med)
get: move node to head
put: insert at head, evict tail if size > cap
Elasticsearch/OpenSearch index with geo_distance filter + facets, ETA computed live or cached per cell, ranking by relevance + personalisation + availability. Cache by geohash + filter key. (Med)
Monitor demand/supply per zone (orders vs available riders), compute a multiplier with caps and smoothing, communicate it upfront. Also apply supply-side incentives to riders. Avoid oscillation with hysteresis. (Med)
CDN with responsive images (WebP/AVIF, multiple sizes), lazy loading, blur placeholders, cache-busting via content hashes, origin shielding. Track LCP on low-end Android devices over 4G. (Med)
Pre-scale before the toss (predictable spikes), pre-warm caches and connections, queue team submissions, use a read-heavy cache for contest lists, run game days/load tests at 2-3× the expected peak. (Hard)
Smart routing: success-rate scores per bank/issuer/method, updated in near real time. Fail over to another gateway/acquirer on a downtime signal, never retry a debit that might have succeeded (check status first), use idempotency keys. (Hard)
Route by success score -> fail over on downtime -> check status before retry -> idempotency key
Async status-polling workers with backoff, then NPCI/bank reconciliation, auto-refund/deemed-success rules, user-facing timeline notifications, and an alert on pending % spikes per bank. (Hard)
Scheduler (delayed queue / partitioned cron by user bucket), idempotent send, channel fallback (push → SMS/WhatsApp), quiet hours, audit trail for regulatory compliance. (Med)
Each interviewer owns 1-2 LPs. The bar raiser probes depth with follow-ups ("what would you do differently?", "what was the data?"). Prepare 2 stories per LP, with numbers. (Med)
Communication, problem solving, coding quality and verification (testing your own code). Think aloud, state complexity, write clean code in a shared doc (often without autocomplete), dry-run edge cases. Hiring decisions are made by committee from written feedback. (Med)
Two heaps: max-heap for the lower half, min-heap for the upper half, kept balanced (sizes differ by ≤ 1). Insert O(log n), median O(1). (Hard)
lower half -> max-heap
upper half -> min-heap
rebalance so sizes differ by <= 1
Geohash/H3/S2 cells. Query the user's cell plus neighbours in an in-memory geo index (Redis GEOSEARCH), rank by ETA rather than straight-line distance. Update driver location every few seconds. (Med)
Splitwise: User, Group, Expense (with split strategy: equal/exact/percent), Balance sheet map. Simplify debts with a greedy match of max creditor vs max debtor. Show SOLID and extensibility. (Med)
User, Group, Expense(equal/exact/percent), BalanceSheet
Simplify: match max creditor vs max debtor
Use the app before the interview. Pick one concrete user pain, propose a fix with a metric (conversion, time to order) and how you'd A/B test it. Shows product sense, which Indian startups weight heavily. (Easy)
Always prepare 3-5 questions. Silence suggests low interest. Ask about role/team/success.
Example Prepare 3-5 questions
Interviewers evaluate process. Narrate approach, trade-offs, and uncertainties.
Example Think aloud
Persist; try smaller cases, ask hints, explore. Partial progress beats silence.
Example Persist + ask hints
Start simple; add complexity only when needed. KISS principle.
Example Simplest correct first
Test empty, single, duplicates, extremes. State edge-case handling.
Example Edge cases in tests
Be concise, structured, and responsive. Check understanding.
Example Structured answers
Always dry-run and test. Catch off-by-one and null issues.
Example Dry-run + tests
Understand patterns; adapt to variants. Interviewers vary problems.
Example Patterns not memorization
Balance: concise answers, expand when asked. Read interviewer cues.
Example Concise + expand on cue
Disagree respectfully with data; accept final decision. Professionalism matters.
Example Respectful disagreement
Admit gaps; show learning approach. Honesty builds trust.
Example Admit + learn
Restate problem; confirm inputs/outputs/constraints before coding.
Example Clarify first
Plan first; write after approach is clear. Saves rework.
Example Plan before code
Stay positive/neutral. Focus on growth and future. Red flag otherwise.
Example Positive framing
Want this as flashcards? Study these 120 cards recall-first in the browser — flip, answer out loud, grade yourself.
What's new and the interview questions people are actually getting asked. No spam.