DEV Community

Cover image for My Google Technical Interview Cheat Sheet
Elliot
Elliot

Posted on • Updated on

My Google Technical Interview Cheat Sheet

Introduction

In the last couple of months of 2018, I spent most of my days preparing for my Google Internship technical interviews. I ended up getting the job, and had a great experience!

Two months after my internship, I wanted to share the document I used and prepared in the weeks leading up to my interviews. For me, creating this cheat sheet was like creating a cheat sheet before an exam. The process of creating it and checking the steps over and over solidified the steps in my mind.

I believe anyone can pass interviews at the big tech companies, you just have to spend time learning about the interview process and preparing.

This document is high level enough that it should be applicable to any sort of technical interview, whether you are applying to Google, a startup, or your first internship. I hope it can help you feel more comfortable in your preparation and interview process!

Technical Interview Cheat Sheet

Resources

https://www.pramp.com/#/

An interview practice tool. Take turns interviewing and being interviewed by someone with a shared code editor, and video and voice chat.
The best resource. Interviews may be awkward or difficult at first, but the more you do, the more comfortable you will be, and the better you will do in a real interview.

https://codesignal.com/

Good questions from real interviews at Facebook, Google, Microsoft, etc. I recommend codesignal over alternative code practice websites, because most questions include a target space and time complexity.

(Cracking the Coding Interview)

My favorite parts: Interview Preparation Grid (pg. 32), the whole behavioral questions section, and Interview Questions: Data Structures (pg. 88 - 107). If you haven't encountered space and time complexity before, this book has a good, quick, practical introduction to the concept.

Throughout the Interview:

  • Consistently communicate, with honesty. (Keep talking while you are thinking, communicate your thought process)
  • Chat, joke around, have fun.
  • Write down any important information.
  • Ask questions, and adapt to what the interviewer gives you.

Step by Step:

These are the steps I followed from the start of the technical interview to the end. Don't worry about getting through all of them, just get as far as you can, giving each step as much attention as it needs. (In one of my interviews I only just started on step 9 before I ran out of time). When I got off track I found these steps helped me reorient myself and keep going.

  1. Read Question
  2. Clarify understanding of inputs, outputs, and side effects
  3. Ask questions, and state any reasonable assumptions
  4. Go through an example to ensure understanding of problem
    • Spend as much time as you need just understanding the problem, this is important
  5. Think of an algorithm to solve the problem
    • Try a similar, but less complicated problem.
    • Try paying attention to your process in manually working through an example.
  6. Go through an example or three to make sure the algorithm works
    • State any edge cases and address them
  7. Discuss Time and Space complexity
  8. If you can think of a better algorithm, and you have time, go to step 4; otherwise ask if this is good, if it isn’t, go to step 4
  9. Implement
    • Break the problem down into several methods (if it is good to do so)
  10. Look over code for errors.
  11. Think of edge cases arising from how your algorithm is implemented.
  12. Go through an example with the implementation, looking out for errors.
  13. Once you are sure your code is correct, clean it up.

Top comments (22)

Collapse
 
yuripredborskiy profile image
Yuri Predborskiy • Edited

Elliot, Good Job!

I also recommend leetcode.com/ - it has a ton of problems to solve and some have solutions with detailed explanations. If you're stuck, try looking at an existing solution to understand the algorithm, and then try to develop something similar. If you can't figure it out, don't dwell on it and try something else.

They also have "Explore" section where they have a number of articles explaining certain algorithms, and give you a number of questions that are solved using provided algorithms. The questions are grouped into blocks, like working with binary search, binary trees, hashes and arrays, linked lists etc.

They also have over 800 questions total, including some rather hard questions (like: write a sudoku solver, it is a fun challenge if you know what is sudoku), and weekly contests. They also have forums where you can often find solutions to questions (sometimes with explanations). And they also have interview questions for various large companies, except those are premium features requiring a subscription. I plan to get onto it after I finish CTCI and finish exploring.

For me personally leetcode was a great find as I figured out how to solve some rather difficult questions in an efficient way, which was an eye opener.

Collapse
 
patricktingen profile image
Patrick Tingen

Thanks for this tip, indeed, especially the 'explore' section is very nice because there is some extensive explanation why some choices were made

Collapse
 
voidjuneau profile image
Juneau Lim

Wow, this is good good. The "Step by Step" part seems like a neat summary of the book CtCI.
I haven't tried yet but I recently heard this site.
Thank you for the post! I am going to review it numberless times.

Collapse
 
elliot profile image
Elliot

Thanks for the comment Juneau :)

That site looks really cool and interesting but I haven't tried it yet. I'd be interested to hear how it compares to pramp.

Collapse
 
voidjuneau profile image
Juneau Lim

I also have only tried Pramp.
Didn't know about Code Signal. Seems like a cool site, not only providing either learning or practice, but both. It will be good for a recap as well.
Thanks for letting me know about it.

Collapse
 
iamshadmirza profile image
Shad Mirza

Which book you're suggesting in (cracking the coding interview) part?

Collapse
 
elliot profile image
Elliot
Collapse
 
iamshadmirza profile image
Shad Mirza

Oh that was the book name, my bad. Thank you so much.

Collapse
 
mehdishahdoost profile image
Mehdi Shahdoost

Great article.thanks.

Collapse
 
shernz profile image
Shernz

Great! Thanks for sharing! And congratulations on your job confirmation at Google!!

Collapse
 
elliot profile image
Elliot

Thanks Shernz :)

Collapse
 
jonathanmkpt profile image
Jonathan Thomas

Thank you for this

Collapse
 
modafalla profile image
Mohamed Dafalla

Thanks for sharing and congrats!

Collapse
 
kensixx profile image
Ken Flake

Wow, I didn't know these resources exist since this article. Thank you so much, Elliot!

Collapse
 
elliot profile image
Elliot

Glad I could introduce you to these resources. They helped me a lot :)

Collapse
 
shubhamcoding profile image
shubham agarwal

Thank you so much sharing this valuable information , these detailed & step wise cheat sheet is gonna be very use-full . really you can swim through internet :P

Collapse
 
broady profile image
Chris Broadfoot

Great tips. I've interviewed 150+ people for Google and I wish they'd all have prepared like this.