A quick guide on getting ready for tech interviews.
Before diving into code, most interviewers like to chitchat about your background. They're looking for:
- Metacognition about coding. Do you think about how to code well?
- Ownership/leadership. Do you see your work through to completion? Do you fix things that aren't quite right, even if you don't have to?
- Communication. Nerd out about stuff. Show you're proud of what you've done, you're amped about what they're doing, and you have opinions about languages and workflows.
- STAR (Situation, Task, Action, Result). It’s good to have a project in your back pocket that you can talk about in a direct and concise way.
There are usually 6 steps while solving a coding challenge. One very important thing is to make sure you are on the same page with the interviewer throughout the process. This is not about showing off how deep or convoluted your solution is while leaving your interviewer in the dust. It’s about working together since ultimately that is what might end up happening.
Sometimes questions are intentionally vague to test whether you are thinking of corner cases. Don’t assume anything. Ask many questions to clarify. Are inputs sorted? Are inputs strings or integers? Even something silly like “are all inputs non-negative” can change whether or not you handle that scenario in your code.
Just like in the previous step, sometimes the wording is intentionally broad. Words like “fast” and “good” should be defined to quantifiable things, if necessary. Ask about space and time constraints (Big-O). Write down trivial examples about the problem.
Verbally propose a solution. Explain the data structures involved and their space-time tradeoffs. Ask the interviewer if he/she understands your idea. Make sure the interviewer understands your idea.
What’s wrong with the proposed solution? What are the tradeoffs involved in your proposed solution? Compare time, space, understandability, simplicity.
Notice how long it is before you started coding? Now is the time to start coding. If possible, try to maintain communication with your interviewer, explaining each line of code as you go. If talking and writing code is too much, you can always write comments with your code like you would normally.
Remember those trivial examples you wrote down in step 2? Use them as test cases and walk through your code line-by-line. Even if you are 100% sure you wrote the best solution without a bug, it’s important to demonstrate that you test and ensure correctness.
Sometimes this can make or break an interview. Make sure you research the company you are interviewing with (duh!). Be curious about the company and ask questions that matter to you. Some examples could be:
- Will I be in a customer-facing role?
- Who are the business competitors?
- Do you enjoy working at Company X?
- What is the daily/weekly/monthly workflow?
Cracking the Coding Interview http://a.co/8HTHxGo Java Most Popular
Elements of Programming Interviews http://a.co/5wKv5uq C++, Java, Python Python -- sample (http://elementsofprogramminginterviews.com/sample/epilight_python_new.pdf) Features study guides based on time (4 months to a weekend)
Hacker Rank https://www.hackerrank.com/ Free Completely online
Interview Cake https://www.interviewcake.com/ Free trial Features a nice walkthrough for each step of the problem
Google — Example Coding/Engineering Interview https://www.youtube.com/watch?v=XKu_SEDAykw Nice video walkthrough of how a google interview goes
After studying many hours and going through many technical interviews, I began taking notes about the process. After I had a few friends ask me about interviewing, I decided to put my notes together into a quick, concise guide.