🖥️ Computer Science — Staff-Level Interview Questions¶
8 deep-dive CS topics for Staff/Principal Engineer backend interviews \ Each topic contains 9–15 questions, plus deep-dive companion pages, with code examples, diagrams, and staff-level analysis
📋 Topic Overview¶
cs-interview/
├── README.md ← You are here
│
├── operating-systems/ ← Memory, processes, I/O, scheduling
│ └── INTERVIEW_QUESTIONS.md (12 questions)
│
├── computer-networks/ ← TCP/IP, HTTP/2/3, DNS, TLS, load balancing
│ └── INTERVIEW_QUESTIONS.md (12 questions)
│
├── database-systems/ ← B-Trees vs LSM, MVCC, replication, sharding
│ ├── INTERVIEW_QUESTIONS.md (14 questions)
│ ├── POSTGRESQL_DEEP_DIVE.md (13 sections: internals, tuning, operations, 12 interview questions, PG 17–18 changes)
│ └── DYNAMODB_DEEP_DIVE.md (13 sections: keys, indexes, single-table design, bulk scenarios)
│
├── distributed-systems/ ← CAP, Raft, gossip, distributed transactions
│ ├── INTERVIEW_QUESTIONS.md (12 questions)
│ └── DISTRIBUTED_TRANSACTION_PATTERNS.md (12 sections: 2PC, saga, outbox, TCC, idempotency)
│
├── concurrency-parallelism/ ← Lock-free, memory models, schedulers
│ └── INTERVIEW_QUESTIONS.md (9 questions)
│
├── data-structures-algorithms/ ← Bloom filters, sketches, Merkle trees
│ ├── INTERVIEW_QUESTIONS.md (10 questions)
│ └── DATA_STRUCTURES_FOR_SCALE.md (12 structures)
│
├── software-architecture/ ← DDD, modular monolith, event-driven, CQRS/ES, migrations, API compatibility, ADRs
│ ├── INTERVIEW_QUESTIONS.md (15 questions)
│ └── DESIGN_PATTERNS.md (12 GoF patterns in 11 sections + selection framework)
│
└── security/ ← OWASP, JWT, OAuth2, secrets management
└── INTERVIEW_QUESTIONS.md (10 questions)
🎯 Target Audience¶
| Level | Years Exp | What's Expected |
|---|---|---|
| Senior | 5–8 | Deep understanding of one topic area |
| Staff | 8–12 | Cross-cutting knowledge across ALL topics |
| Principal | 12+ | Production war stories, trade-off mastery, ability to design from scratch |
📖 How to Use¶
- Pick a topic you're weaker on
- Read the question and attempt to answer aloud
- Study the answer — pay attention to trade-offs, not just the "right" answer
- Trace the code examples — run them mentally, understand every edge case
- Connect topics — e.g., "How does the OS's page cache affect database performance?"
🔗 Cross-Cutting Themes¶
| Theme | Appears In |
|---|---|
| Caching | OS (page cache), Networks (CDN), Databases (buffer pool), Distributed (caches) |
| Consistency vs Availability | Databases (CAP), Distributed (PACELC), Architecture (eventual consistency) |
| Concurrency Control | OS (locks), DB (MVCC), Distributed (consensus), Concurrency (lock-free) |
| Latency at Scale | Networks (TCP), DB (query opt), Distributed (RTT), Architecture (CQRS) |
| Fault Tolerance | Distributed (Raft), Architecture (circuit breakers), Security (redundancy) |
Master these topics and you'll be prepared for the most rigorous Staff/Principal engineer interviews at FAANG, tier-2 tech, and high-growth startups.