- Talk through your thinking process, flag uncertainty
- Be: fast, positive/enthusiastic/passionate, transparent, fact-based, methodical, and express explicitly (to prevent hidden assumptions and getting stuck)
- If stuck: remain calm, check asumptions, try more examples, simplify, ask, avoid silence or filling it
- Missing details? Special cases & their indication / handling?
- Restrictions? Guarantees?
- Types? Ranges? Sizes? Cardinality? How often? Unique / repetitions / empty / partially ordered?
- Can I modify the input data structure?
- Function signature & spec?
- Accounted for entirety of interviewer's description?
- Beware of: assumptions, "familiar" exercises, early optimization; Start simple
- List alternatives telling their pros and cons (e.g. time/space complexity); is there a time vs. space trade-off?
- Tactic: Write (or draw) examples to identify a pattern
- Tactic: Simplify (relax constraints) then generalize
- Tactic: Base case & build up (induction, scale), dyn. prog.
- Tactic: Match to other similar problem / data struct. (for example: heap, graph, stack, etc.)
- Tactic: (Consider greedy alg., backtracking, iterating the smaller param.)
- Pick one achievable in an interview (solution likely to be simple enough); indicate complexity
- Pick a data structure
- Modularize (break-up code into distinct parts for clarity)
- Test input (as a remark)
- Beware of < vs <=, +1 vs +0, null checks, overflows
- Code must compile - obey syntax, but okay to ask if don't remember name or behavior
- Describe how would you test, run through a simple case
- Normal case
- Non-trivial, corner cases
- Full coverage time permitting
- (Other: invalid input, randomized tests, load testing)
- Point out options for refactoring (?)
- HackerRank - my solutions
- LeetCode - my solutions
- Codility - my solutions
- Geeks for Geeks - my solutions
- Codeforces
- InterviewBit (consider their mock interviews)
- Kattis
- ACM-ICPC questions
- Codejam questions
- Patterns for Coding Questions ❗
- LeetCode - Top Interview Questions ❗
- Algorithm Design Process at Hired in Tech
- Actual interview questions on CareerCup
- Cracking the Coding Interview
- Programming Interviews Exposed
- Google: Prepare for an Engineering Interview
- Interview tips from Google Software Engineers
- Coding Interview University
- Iterate quickly on the design while prioritizing what to work on next
- Communicate trade-offs, decissions
- Have a dialog with your stakeholder (interviewer)
- Dare to ask for help if necessary (but own it with confidence)
- Go from an ill-defined goal to a formulated statement of what to build (and what is out of scope)
- Disambiguate, gather requirements - ask clarifying questions (missing details or restrictions) - beware of assumptions!
- Agree on scope / use cases (First a minimum viable product then explore other functions - embodiment, features, feature aspects/specifics, scale/numbers: Mobile vs. web? API vs UI? Customizable? Monetization? Descending or random order? Analytics? Scale / numbers?)
- Start with basic, abstract design (e.g. key-value store, web server)
- Delineate what is where (cloud, user's equipment)
- Describe how the user interacts with the system and what is the sequence (of inner system interactions)
- Prioritize the next steps
- Say what can fail / overflow / bottleneck, trade-offs (CAP theorem - consistency, availability, partitioning),
- Say how to distribute and how to fix whats broken by distributing
- Show specific alternatives / solution space
- Ballpark estimates
- If you do not know something - be upfront about it but do offer a direction
- If you are particularly familiar with an aspect - do mention it
- Is anything missing (look closer at details/aspects)?
- How would it change the behavior of users?
- Alex Yu - System Design Interview ❗
- NeetCode: System Design (including 20 system design concepts in 10 Minutes) ❗
- Learn System Design in a Hurry ❗
- Jackson Gabbard - Intro to Architecture and Systems Design - Interviews
- System Design Process on Hired in Tech
- Patrick Halina - Systems Design Interview Guide & ML Systems Design Interview Guide
- System Design Primer
- Build Your Own X
- Design principles, patterns, best practices - SOLID, Low Coupling & High Cohesion, Heroku's 12 Factors, Domain Driven Design, REST & Richardson Maturity Model & CQRS, DRY too much, Semantic Versioning (and locking versions), Immutable Object/Server/etc., Idempotent Operations, event sourcing, Minimal Privileges & Isolation, Encryption in Transit & at Rest, Service discovery and Service Registry (Zookeeper, etcd, Consul), ACID (atomicity, consistency, isolation, durability), conventional commits
- Architectural Safety Measures: Circuit-breakers & back-off timeouts, Correlation IDs & healthchecks & monitoring & logging & alerts, System Bulkheads
- Embracing System Failure: OWASP Top Ten, Chaos Engineering & Antifragile Engineering
- Microservices: best practices & antipatterns / pitfalls