Framework Thinking - SDE Interview
Here is framework thinking for SDE Interview.
1. Computer Science
-
What is it ?
-
Apply in practice.
2. Coding Interview
-
Understand the problem
-
Clarify constraints, asks 4 - 5 questions including edge cases.
-
Explore examples.
-
Brainstorm 2 - 3 solutions, naive solution first and optimize later. Explain the idea of each solution.
-
Dry run with examples to explain ideas of each solutions, code it easy to understand with Python and in a function (e.g. function Solution).
-
Implement solutions.
-
Dry run testcases.
3. System Design
-
Understand the problem
-
Identify functional requirements / non-functional requirements (Availability, Scalability, Performance).
-
Estimate capacity: QPS, Storage => Ask for Daily active user, Action per user, How long you store data
-
Data Models & Relationship (use-a, has-a, is-a) & API Design.
-
High-level for Functional Requirements.
-
Data Flow
-
Bottlenecks
Constraint Typical Bottleneck How to Spot QPS / Throughput DB writes, queues Estimate expected QPS vs max capacity Latency Synchronous I/O, API chaining Count service hops, network calls Availability Single point failures Check if component can fail alone Storage / Growth DB size, partitioning Estimate data scale over time -
Scaling Patterns: Scaling reads, scaling writes, real-time updates,…
-
Action Plan: Mobile Team, FE Team, Backend Team,…
4. Low Level Design
4.1. Design
-
Clarify the requirements.
-
Choose the entities.
-
Define fields and methods for entities.
-
Define relationship functions: use-a, has-a, is-a.
-
Define central class service.
4.2. Implementation
-
Follow SOLID, Coding Patterns.
-
Follow Design Patterns.
-
Handle concurrency.
-
Handle edge cases, exceptions.
4.3. How to write a class for function ?
-
Clarity: understand the thinking process.
-
Intent: have intent when and why to use it.
-
Single responsibility: Each class takes 1 responsibility to do.
4.4. How to decide the pattern ?
- Creational Patterns:
- How the object are created using singleton or clone ?
- Structural Pattern:
- How this system is adapt to new larger system ?
- Behavior Pattern:
- How each components interact with others ?
5. Behaviour Interview
-
Read the full questions
-
What is core intention: Problem-solving (Internal), Teamwork & Collaboration & Conflict Resolution (External)
-
Situation: your team, what is project, why we have this project ?
-
Task: Scope of your task, not your team.
-
Action: Step 1 → Step 2 → Step 3 + Why, show your thinking process.
-
Result: Result metrics, Collaboration, Lesson Learn => Trick: Show the keyword + Prove from action.
-
Follow-up questions ?
a. Drill-Down Questions (Testing Depth)
- How to answer: Be specific
b. Self-Reflection Questions (Testing Growth Mindset)
- How to answer: Be humble, honest, and constructive.
c. Scope & Contribution Questions (Testing Ownership)
- How to answer: Be honest and precise.
d. Challenging Questions (Testing Resilience & Professionalism)
- How to answer: Stay calm and professional. Don’t get defensive, focus on share goals, not personal drama.