
Textbook: Cracking the Coding Interview
7. Technical Questions
- 7.1 How to Prepare
- 7.2 What You Need To Know
- 7.3 Walking Through a Problem
- 7.4 Optimize & Solve Technique 1: Look for BUD
- 7.5 Optimize & Solve Technique 2: DIY
- 7.6 Optimize & Solve Technique 3: Simplify and Generalize
- 7.7 Optimize & Solve Technique 4: Base Case and Build
- 7.8 Optimize & Solve Technique 5: Data Structure Brainstorm
- 7.9 Best Conceivable Runtime (BCR)
- 7.10 Handling Incorrect Answers
- 7.11 When You've Heard a Question Before
- 7.12 The Perfect Language for Interviews
- 7.13 What Good Coding Looks Like
- 7.14 Don't Give Up!
Cracking the Coding Interview
Preparing for technical interviews
1. The Interview Process
1.1 What
Most top tech companies and many other companies who copy them, use algorithm and coding problems to as the largest component of the interview process.
These boil down to problem solving questions where the interviewer is looking to evaluate your ability to solve algorithmic problems you haven't seen before, in order to assess based on the following categories;
-
Analytical Skills:
- Optimal solution
- How much help needed
- How long it took
- etc
-
Coding Skills:
- Translate algorithm to code
- Tradeoffs
- Followup to design/architect a new solution
- etc
-
Technical Knowledge / Computer Science Fundamentals:
- Strong fundamentals
- etc
-
Experience:
- Good technical decisions in past
- Built interesting
- Challenging projects
- etc
-
Culture fit / Communication skills:
- Personality and values
- Fit with the company
- etc
1.2 Why
Because its better than nothing. Companies need some way to filter the thousands of candidates per position. No point in complaining, just study and prepare for the interviews.
1.3 How Questions are Selected
Some companies have their own internal question banks, some use public question banks, and some use a combination of both.
Prepare for both cases:
- current up to date company question
- popular and important leetcode questions
1.4 Its All Relative
For a specific question, an interviewer is simply comparing you to other candidates:
- 30 mins to solve
- 50 mins to solve
- 15 mins to solve but many hints
- 10 mins with an alternate approach
A hard question thus isn't a bad thing. When its harder for you, its harder for everyone else as well. An interviewer is simply getting a feel for you performance relative to all other candidates they have ever asked this question to.
1.5 Frequently Asked Questions
No answer, rejection? If you haven't heard in 3-5 business days, check in with the recruiter, else move on.
Reapplying? Yes, but typically have to wait 6 months to a year.
2. Behind the Scenes
2.1 A Repeat Curtain
Most companies conduct their interviews in similar wars:
-
2x Screening Interviews
- coding and algorithms questions
- bar can be just as high as onsite interviews
-
Onsite 4x-6x Interviews
- the standard technical interview
-
Lunch Interview
- non technical
- discuss interests
- opportunity to discuss company culture
-
After Interview Feedback
- performance
- feedback
- decision