Stage 1 · Code
Mock Interviews & Strategy
Mock Interview — Onsite / Hard
Hard problems that test system design thinking within algorithms, multi-step reasoning, and optimization under pressure. Hints only — no full solutions.
Onsite Strategy
Onsite problems are less about pattern recognition and more about combining multiple patterns, handling tricky edge cases, and optimizing beyond the obvious solution. Expect 35-45 minutes per problem.
- Spend 5-7 minutes clarifying — on hard problems, ambiguity is often intentional. Ask about constraints, expected output format, and edge cases thoroughly.
- Start with a feasible approach — even if it's O(n²). Hard problems often require getting the brute force right first, then optimizing.
- State the lower bound — say 'This is O(n log n) because we must sort, so O(n) isn't possible.' or 'We must examine every element, so Omega(n) is the lower bound.'
- Optimize incrementally — O(n²) → O(n log n) → O(n) → O(log n). Show your thought process stepping through each improvement.
- If stuck, simplify — solve a restricted version (e.g., assume no duplicates, assume sorted input, assume tree is balanced) then generalize.
Hard problems often have deceptively simple O(n) solutions that are hard to see. Don't sit in silence trying to find the perfect approach. Start with a working solution, even if slow. Most interviewers want to see you write correct code and then iterate, rather than spend 20 minutes thinking without writing anything.
Graph & Tree (Hard)
These test your ability to combine traversal with state tracking, parent pointers, or advanced tree properties.
DP & Optimization (Hard)
Hard DP problems often require state compression, non-obvious state definitions, or combining DP with another data structure.
Advanced Data Structures (Hard)
These test your ability to design and combine data structures under constraints.
Key Points
- Hard problems test process over perfection. A working O(n²) solution is better than a broken O(n) one.
- Use the full 45 minutes. Don't rush. Pause, think, then speak.
- Interval DP (burst balloons, matrix multiplication) is a distinct sub-pattern — practice it separately.
- Advanced data structure problems (LFU, All O(1)) test whether you can combine multiple primitives correctly.
- After the interview, write down what blocked you. Was it the recurrence? The data structure choice? The edge case? Target those weak points.
Mark this lesson complete to store local progress and unlock a cleaner resume path the next time you visit.