💼 Interviews
Tech Interview Prep
Behavioural questions, DSA patterns, system design, and negotiation — complete interview cheatsheet.
📖 6 sections
⏰ 18 min read
✅ Quizzes included
01Behavioural Questions (STAR)
INTERVIEWSTAR method
STAR = Situation, Task, Action, Result

Q: "Tell me about a time you solved a difficult problem."
S: Situation - "Our API was returning errors for 20% of users."
T: Task      - "I was responsible for identifying the root cause."
A: Action    - "I added logging, traced errors to a race condition,
               then implemented a mutex lock."
R: Result    - "Error rate dropped to <0.1% within 2 hours."
Tell me about yourself
1. Current role (30s), 2. Relevant experience (30s), 3. Why this role (30s). Keep under 90 seconds.
Why this company?
Research the company! Mention: specific product you use, their tech stack, mission alignment, recent news.
Greatest weakness
Pick REAL weakness + show improvement: "I used to avoid asking for help. Now I set a 30-min timer before escalating."
Where do you see yourself?
Align with role growth. "I want to become a senior engineer and mentor juniors — this role gives that path."
02DSA Interview Patterns
PatternWhen to useKey technique
Two PointersSorted array, pair sum, palindromeleft/right pointer moving inward
Sliding WindowSubarray/substring, fixed or variable sizeExpand right, shrink left
Fast & Slow PointersCycle detection, middle of linked listslow+=1, fast+=2
Binary SearchSorted input, find target or boundarylo/hi/mid, eliminate half each step
BFSShortest path, level order, graphQueue, visited set
DFSAll paths, tree traversal, backtrackingStack/recursion, visited
Dynamic ProgrammingOverlapping subproblems, optimal valueMemoize or tabulate
Monotonic StackNext greater/smaller, histogramMaintain increasing/decreasing stack
💡
For any array problem: consider sorting first. For any string problem: consider a hashmap for frequency counting.
03System Design Framework
INTERVIEWSD interview steps
1. CLARIFY requirements (5 min)
   - Functional: what must it do?
   - Non-functional: scale, latency, availability?
   - Constraints: daily active users, data volume?

2. ESTIMATE scale
   - 1M DAU x 10 requests/day = 10M req/day = ~115 req/sec
   - Storage: 1M users x 1KB profile = 1GB

3. HIGH-LEVEL design
   Client -> Load Balancer -> App Servers -> Cache -> DB

4. DEEP DIVE
   - Database choice (SQL vs NoSQL, why?)
   - Caching strategy (Redis, what to cache?)
   - API design (REST endpoints)
   - Scaling bottlenecks

5. TRADE-OFFS
   - CAP theorem, consistency vs availability
SQL vs NoSQL
SQL: structured data, ACID, relations. NoSQL: flexible schema, horizontal scale, high write throughput.
Cache when
Frequently read, rarely written data. User sessions, hot content, computed results.
Message queue
Decouple services, handle spikes. Kafka=high throughput, RabbitMQ=routing.
04Coding Interview Tips
Read the problem twice
Identify: input/output types, edge cases, constraints. Ask clarifying questions BEFORE coding.
Talk while coding
Explain your thought process. Interviewers want to see HOW you think, not just the answer.
Start with brute force
State the O(n2) solution first. Then optimize. Shows you can reason through complexity.
Test your code
Trace through with example. Check edge cases: empty input, single element, negatives.
Big-O analysis
Always state time AND space complexity. Know how to derive it from loops and recursion.
Clean code
Meaningful variable names. Small functions. No magic numbers.
INTERVIEWProblem solving template
1. Read + Clarify (2 min)
2. Examples: draw/trace 2-3 examples
3. Brute force approach + complexity
4. Optimal approach + complexity
5. Code it up
6. Test: happy path, edge cases
7. Optimize if time allows
05Salary Negotiation
Never give first number
Say: "I'd like to understand the full comp package first." Or give a range based on research.
Research market rate
Glassdoor, Levels.fyi, LinkedIn Salary, Blind. Know your number before the call.
Negotiate everything
Base salary, equity, signing bonus, vacation days, remote work, title, review timeline.
Counter-offer script
"I'm very excited about this role. Based on my research and experience, I was expecting [X]. Is there flexibility?"
Competing offer
Best leverage. "I have an offer for [X] from [Company]. I prefer your role — can you match it?"
Get it in writing
Never accept verbally. Ask for the offer letter before giving notice.
💡
The hiring manager almost always expects you to negotiate. Not negotiating leaves money on the table. The worst they can say is no.
06Resume & LinkedIn
INTERVIEWResume bullet formula
STRONG: "Reduced API response time by 40% by implementing Redis caching,
         improving user retention by 12%."

WEAK: "Worked on backend improvements to make things faster."

Formula: [Action verb] + [what you did] + [measurable result]

Action verbs: Built, Designed, Optimized, Reduced, Increased,
              Led, Implemented, Automated, Refactored, Deployed
ATS optimization
Use keywords from the job description. Standard headings: Experience, Education, Skills, Projects.
Projects section
Include: what it does, tech stack, your specific role, results/metrics if any.
LinkedIn
Headline = current role + 2-3 skills. Summary = 3 sentences. Add all skills section.
GitHub
Pin 4-6 best repos. Add README with screenshots, tech stack, and how to run.