About these notes

Framework for coding interviews

reference

Having a framework by which you approach every single technical interview greatly improves your chances of success. It can’t help you have a perfect session, but almost guarantees you will have at least a mediocre session. Think of it like military SOPs. It helps to:

Very important companions to this note:

As a disclaimer, this framework is what I used when preparing specifically for the Google interview process. So it is tailored for 45-min interviews, out of which the first 5 I assumed as lost for self-introductions1.

DON’T START CODING BEFORE YOU GET THE OK FROM YOUR INTERVIEWER.

00 - 05: Clarify

  • Restate the problem in your own words.
  • Ask clarifying questions.
  • Work through input examples/test-cases. (critical: don’t start thinking about solution approaches yet)

05 - 10: Brute Force

  • Figure out a brute force solution. Always make sure you get brute force correctly first 2. Discuss time and space complexity.

10 - 15: Optimize

  • Optimize the solution. Discuss various approaches with trade-offs and complexities.

15 - 30: Code

Code the solution. A complete non-optimal solution is better than an incomplete optimal.

30 - 35: Test

  • Test the code
  • Try edge cases
  • Fix bugs

35 - 40: End of interview questions

  1. The amount of time you will loose on this part greatly varies with your interviewer, but 5 mins is a safe, conservative assumption. 

  2. By no means do I mean to code the brute force (unless your interviewer asks you to). I mean to discuss a brute force solution and explain how it would work verbally. 

← back

Links to this note

Coding intervew tiny best-practices recap

Before problem: Make 1 min chit-chat and make the interviewer smile. IF you’re asked, say one or two nice things about yourself, but keep it SHORT. During problem: Follow the...

Coding interview resources

LeetCode1 is the single place where one should be spending the vast majority of their time preparing for coding interviews. However, LeetCode is a vast labyrinth, and easy to get...

Tech interview resources

tl;dr; This applies to Big Tech and other companies who are applying similar interviewing strategies. - Spend 2 weeks reading “Cracking the Coding Interview” and familiarizing yourself with the process....