
Last year, I spent the last couple of months preparing for an interview for an internship at Google (Google Internship). Everything went well: I got both the job and great experience.
Now, two months after the internship, I want to share the document I used to prepare for interviews. For me, it was kind of a cheat sheet before an exam. However, the process of creating the document and the constant step-by-step verification helped me remember all the important things.
I'm confident that anyone can successfully pass interviews at major tech companies; it just takes some time to understand how these interviews are structured and to prepare for them.
My cheat sheet will be enough for you to prepare for any technical interview, whether it's Google, a startup, or your first internship. It will help you feel more confident both during the preparation and at the actual interview.
Recommended free programming bootcamps for beginners:
– August 8-10;
– August 12-14;
– August 15-17
Cheat Sheet for Technical Interviews
Sites
On this resource, you can practice going through interviews. Participants take turns interviewing each other (there are audio and video channels) and can use a shared code editor. Chances are, in the early interviews, it will be tricky for you and you will feel awkward. But the more you practice, the more confidently you'll pass them, and a real interview afterward will seem easy.
Good questions from real interviews at Facebook, Google, Microsoft, etc. I recommend using this site along with coding practice resources, including studying algorithmic complexity.
Books
Cracking the Coding Interview
My favorite parts: Interview Preparation Grid (p. 32), the section on interview behavior, and Interview Questions: Data Structures (pp. 88-107). If you're not familiar with the term 'algorithmic complexity', now is the time; the book provides an excellent introduction to the topic.
What to do in an interview?
- Stay engaged in the conversation and answer honestly. When thinking about a question, think aloud and describe your thought process.
- Add a bit of humor to your conversation, don't be afraid to joke. Try to enjoy the interaction.
- Take note of important information.
- Ask questions and try to use what you learned from the interviewer.
Interview Step by Step
Here's a checklist to prepare for an interview response. You don't have to use all the points; skip those that seem unnecessary to you. The main thing is to rely on common sense. Even if you don’t get to the very end of the list, nothing terrible will happen.
- Read the question.
- Analyze all the data, both input and output, and pay attention to side effects.
- Clarify the essence of the task and state your assumptions so the interviewer understands your thought process. For example, what will the data volumes be and who will be the users.
- Find an example and state it to the interviewer to be sure you understand the task correctly. Don’t be afraid to take time to understand the conditions of the task. The better you understand it, the quicker you'll find an optimal solution.
- Develop an algorithm. Try to solve a similar but less complicated task. Write down your thoughts and work through examples in a draft.
- Go through your algorithm with examples to ensure the code works correctly. Check all critical and edge cases.
- Evaluate the algorithm's complexity both in time and space.
- If you managed to come up with a more efficient solution to the problem, then go back to step 4.
- Write the solution using the selected algorithm. Break the problem into several methods if permissible in the specific case.
- Check the code for errors.
- Consider how the implementation of the algorithm deals with critical and edge cases.
- Test the implementation with an example, review the code for errors.
- Once you've assured that the code runs correctly, check its cleanliness and style.
That's all there is to it!
Source: habr.com
