A few months ago I interviewed for a Software Engineering role at Google. I have had several friends ask me how I prepared for the interviews so I thought I would share my preparation in the hopes that it will help them and others. First off, the recruiters will give you documents providing an overview of what’s expected. Read them and get up to speed with all that information. But, be warned – once you start the interview process (in order to get that document), the interviews will come very quickly. With that in mind, it’s also good to prepare early. Below are links to things that helped me prepare:
- Cracking the Coding Interview – hands down the best book to prepare for Google and other companies
- Programming Interviews Exposed – Recommended in the Google prep document. I read a bit of it but I found the other book better for preparation.
(I’m slowly trying to make a presence on all of these)
- CodeEval (my profile)
- TopCoder (my profile)
- Kaggle (my profile)
- Project Euler (my profile)
- HackerRank (my profile)
- DrivenData (my profile)
I also searched a lot to find specifically how Python (or other languages) implements certain data structures and algorithms. I also spent time pretending Python did not have certain data structures or algorithms and programmed them from scratch using object oriented principles (you can Google ‘how to implement X in Python’ to find lots of examples). Here are the basics you should know:
- Linked Lists – insertions, deletions, etc
- Hash tables – know how hash tables are implemented in theory (i.e. be able to implement one using arrays) as well as how they are implemented in your language of choice.
- Trees – binary trees, n-ary trees, trie-trees, BFS, DFS, traversals (inorder, postorder, preorder)
- Graphs – representations (objects & pointers, matrix, adjacency list), BFS. Extra: Dijkstra, A*
- Dynamic programming – always seems to come up. Some example problems can be found on sites like CodeEval.
- Sorting – know how to implement quicksort, mergesort (and variations on them) but also be familiar with other sorting algorithms
- Big-O – know how to analyze run times of algorithms!
Get a friend to do mock interviews with you. It would be better to do it with friends who are also trying to get jobs so you can push each other. Remember the following:
- Ask clarifying questions to avoid any misunderstanding. In short, restate the question to confirm that you understand the problem being asked of you to solve.
- Do not use any pseudocode, only full code.
- Communicate your thought process while solving the problem. Interviewers want to understand how your mind works when approaching a problem. Always keep talking!
Best of luck! And remember – if you don’t make it the first time, keep reapplying!