Amazon: Leadership Principles & Ownership.
Meta: Fast iteration & Product Sense.
Apple: Precision & Security.
L4/L5 (Senior/LMM)
L6+ (Staff/Principal)
- • Monotonic Stack: Next Greater Element problems.
- • Trie: Prefix matching & Dictionary search.
- • Segment Tree: Range queries (Sum/Min/Max).
- • Union-Find: Cycle detection & Disjoint sets.
- • Sliding Window: Subarrays/Substrings (O(n)).
- • Two Pointers: Sorted arrays (O(n)).
- • Backtracking: N-Queens, Sudoku, Subsets.
- • DP: Memoization vs Tabulation.
• Hashing: Base62 encoding for IDs.
• DB: NoSQL (Key-Value) for scale.
• Cache: Redis for high-read redirecting.
• Protocol: WebSockets for bi-directional.
• Offline: Message queuing (Kafka).
• Status: Heartbeat mechanisms for presence.
Conflict: Tell me about a time you disagreed with a peer.
Failure: Describe a project that didn't go as planned.
Impact: When did you take initiative above your role?
Adapt: How did you handle a drastic requirement change?
- • Action Verbs: +Impact/Metrics.
- • Numbers: "Scaled to 1M requests".
- • Length: 1 Page strict.
- • 1. Recruiter Screen
- • 2. Phone Screen
- • 3. Onsite (4-6 rounds)
Situation: Context of the event.
Task: What was required of you?
Action: What did YOU specifically do?
Result: Outcome with numbers (e.g., +20% efficiency).
- • Structured communication > Fast coding.
- • Explaining trade-offs (A vs B).
- • Handling ambiguity with clarifying questions.
- • Writing modular, production-grade code.
1. Consistent Hashing: Crucial for horizontal scaling. Solves the issue of re-mapping keys when nodes are added/removed. Ring structure with virtual nodes ensures uniform data distribution.
2. Gossip Protocols: Decentralized communication. Used for cluster membership and failure detection (e.g., Apache Cassandra, Redis Cluster).
3. Distributed Tracing: Observability in microservices. OpenTelemetry, Jaeger, and Zipkin. Context propagation across service boundaries.
4. Stream Processing: Kappa vs Lambda Architectures. Exactly-once processing guarantees in Apache Flink and Kafka Streams.
5. CAP Theorem & Trade-offs: Understanding when to prioritize Availability (AP) vs Consistency (CP) in systems like DynamoDB vs MongoDB.
6. Database Indexing Deep Dive: B-Trees vs B+ Trees, LSM Trees (Log-Structured Merge-Trees) for write-heavy workloads like Cassandra and InfluxDB.
1. First Principles Thinking: Breaking down complex problems into basic truths for innovation.
2. Pareto Principle (80/20): Focus on the 20% of patterns that cover 80% of LeetCode hard problems.
3. Second-Order Thinking: Considering the consequences of consequences (critical for System Design trade-offs).
4. Occam's Razor: Choosing the simplest architecture that solves the scale requirement.
• Heavy Hitters (Top K): Count-Min Sketch for frequency estimation. Misra-Gries algorithm for space-efficient top-k identification.
• Range Minimum Query (RMQ): Sparse Table (pre-processing O(N log N), query O(1)). Useful for LCA of trees.
• Network Flow: Ford-Fulkerson and Edmonds-Karp. Applications in bipartite matching and resource allocation.
• Advanced DP: DP on Trees (using DFS to propagate states), Digit DP (counting numbers with specific properties), Bitmask DP for TSP-style problems.
• Geometry Algorithms: Convex Hull (Monotone Chain), Segment Intersections, Sweep Line algorithms for range searches.
Week 1-4: Foundations & Logic. Big-O, Arrays, Strings, Two Pointers, Sliding Window.
Week 5-8: Core Structures. Linked Lists, Stacks, Queues, Recursion mastery.
Week 9-12: Hierarchical Data. Binary Trees, BSTs, Heaps, Treaps.
Week 13-16: Graph Theory. BFS, DFS, Connectivity, Topological Sort.
Week 17-20: Advanced Graphs. Dijkstra, Bellman-Ford, Prim's, Tarjan's SCC.
Week 21-26: Dynamic Programming. 1D, 2D, Knapsack, LIS, LCS, Matrix Chain.
Week 27-30: String Algorithms. KMP, Rabin-Karp, Z-Algorithm, Tries, Suffix Trees.
Week 31-35: System Design Fundamentals. Load Balancers, Proxies, Caching, Sharding.
Week 36-40: Advanced Systems. Microservices, Message Queues (Kafka), Consensus (Raft).
Week 41-45: Industrial Case Studies. Instagram, WhatsApp, Uber, Netflix, YouTube architecture.
Week 46-48: Behavioral Mastery. Leadership Principles, Conflict Resolution, STAR Method.
Week 49-52: High-Pressure Mocks. Peer interviews, Salary negotiation, Final Review.
• Basic API integration (OpenAI/Groq)
• Understanding LLM limitations (Hallucinations)
• Context Window management
• Agentic Workflows (Tool calling)
• LLM Fine-tuning & Distillation
• AI Security & Compliance (Guardrails)
2. **Embed**: Generate vectors via `text-embedding-3`.
3. **Store**: Index in Pinecone or pgvector.
4. **Retrieve**: Semantic search for top-k chunks.
5. **Augment**: Feed context to LLM for final answer.
2. **Execute**: Call tools (Search, Code Exec, DB).
3. **Verify**: Self-correction based on tool results.
4. **Iterate**: Loop until termination criteria met.
• **Cost**: Implement token-based rate limiting.
• **Latency**: Use streaming for responsive UX.
• **Retrieval**: Vector DB (Pinecone/Milvus) with semantic search.
• **Augmentation**: Context injection into LLM prompts.
• **Execution**: Tool use, function calling, and API integration.
• **Memory**: Persistent state across agent steps.
1. **DNS Lookup**: Local cache -> Resolver -> Root -> TLD -> Authoritative.
2. **TCP/TLS Handshake**: 3-way TCP handshake + TLS 1.3 certificate exchange.
3. **HTTP Request**: Browser sends GET request via the socket.
4. **Server Processing**: Load Balancer -> Web Server -> App Server -> Database.
5. **Rendering Phase**: CRP (Parsing HTML/CSS -> Layout -> Painting on GPU).
1. **Algorithm**: Token Bucket (best for burst traffic) or Leaky Bucket (smooth traffic).
2. **Storage**: Redis (fast in-memory increment/decrement).
3. **Strategy**: Sliding Window Log (precise) vs Fixed Window (simpler, but burst issues).
4. **Scaling**: Use Redis clusters and a centralized Rate Limiting service to avoid local state issues.
1. **Iterative**: Use three pointers: `prev`, `curr`, `next`. Move them step-by-step to flip the `next` pointer of `curr`.
2. **Recursive**: Base case (head is null or head.next is null). Recursive call to reverse the rest, then set `head.next.next = head` and `head.next = null`.
3. **Complexity**: Time O(N), Space O(1) iterative, O(N) recursive (stack).
1. **Brute Force**: O(N^2) comparison.
2. **Optimized**: Use a Hash Map to store `complement = target - nums[i]`.
3. **Single Pass**: As you iterate, check if the current number's complement exists in the map. If not, add the current number and its index to the map.
4. **Complexity**: Time O(N), Space O(N).
• Layer 4 vs Layer 7 balancing
• Health checks & auto-scaling
• Strategies: Cache-aside, Write-through, Write-back
• Cache stampede prevention
• Re-sharding challenges
• Consistent Hashing
• Kafka vs RabbitMQ vs SQS
• Idempotency in consumers
T: Resolve conflict without delaying the sprint.
A: Data-driven POC to compare throughput and latency.
R: Selected the hybrid approach; improved perf by 40%.
T: Restore service and find root cause.
A: Led the war room; identified faulty DB migration.
R: Stabilized in 2h; implemented pre-deploy checks.
T: Onboard them effectively while hitting my goals.
A: Created 5-day bootcamp docs & pair programmed.
R: Independent contributor in 3 weeks; docs now standard.