Tips for Acing U Next Coding Interview
How I landed offers from Google, Gusto, and Asana in my first two years of college.
Technical interviews are very daunting, especially if you’ve never done them before and don’t know what to expect. Solving tricky algorithmic problems on the spot with the pressure of the interview is no easy task: it requires quick and careful problem solving, excellent communication, and of course, coding ability.
However, with the right preparation and tips on what to do during your interview, coding interviews really aren’t so bad and can actually be sort of fun and a great way to chat with an engineer who works at the company.
Throughout my two years in college, I’ve had the opportunity to interview at some of the top tech companies such as Google, Facebook, Microsoft, and Robinhood. Although I may not have passed all of these interviews, I definitely learned what areas I need to improve on and what companies tend to look for in interviews.
The following tips and strategies are ones that I’ve accumulated over the past couple of years from mentors, software engineers, various resources online, and personal experience. They’ve helped me get offers at 3 companies in my freshman year as well as the offer I took for this coming summer internship as a sophomore.
Before the interview
The interview is stressful enough with everything being on the spot — you want to put as much time in before the interview to prep your skills so that you know exactly what is expected of you prior to entering that room or call. This will make you more confident during your interview and allow you to focus on showing off your intelligence and people skills.
Code, code, and code
It’s important to know your data structures and basic algorithms like sorting and dynamic programming so be sure to refresh yourself on those topics especially if it’s been a while since you’ve taken those classes. The best way to prepare for the technical and minimize the chances of being unable to solve the problem is to practice all kinds of problems to hone your problem solving and familiarize yourself with the types of problems you may face.
Sites like Leetode and Hackerrank are both great for this as they both have a large database filled with all sorts of questions that you can pick and choose from. Both sites let you filter problems by type (data structures, dynamic programming, databases, languages, etc) and label questions with easy, medium, or hard. Try doing 1–3 problems per day and look at other people’s solutions to see how others are approaching the problem and how you can improve your own logic.
Checkout interviews on interviewing.io’s Youtube channel
This is especially helpful for anyone who hasn’t done a technical interview before since you can get an idea of how technical interviews play out and how other people problem solve and communicate their thought process with the interviewer.
interviewing.io has tons of interviews with engineers from the top tech companies and I definitely recommend giving some of them a watch to familiarize yourself with the dynamic and the expectations.
Do a mock interview
Again, practice is key. If you have friends who are also in the interview search, definitely suggest doing mock interviews with one another. Being able to problem solve and code solutions is important, but so is communication. Use this as an opportunity to practice verbalizing your thought process as you think of the solution and write your code.
If you can’t find any friends, check out interviewing.io. They allow you to set up mock interviews with engineers in the industry who will go through a typical technical interview with you and offer you helpful feedback.
Read Cracking the Coding Interview
This book is a great resource to refresh yourself on specific data structures, algorithms, or types of problems. The book is organized into sections by topic, each with its own section of problems. What I love about this book is that each problem comes with a detailed solution that breaks down the problem, the thought process behind designing and writing the algorithm, and sometimes multiple solutions to one problem. They also talk about time complexity for all the problems, which is a very important concept to know for your interview.
Look on Reddit and Glassdoor for others’ interview experience at that company
Obviously, there is an infinite number of possible questions they could ask you during your interview. Fortunately, most companies tend to ask certain types of questions to their candidates. Look up “[company name] interview questions” or “[company name] interview Reddit” and you’ll probably find discussions and reviews from other past interviewers on their interview experience with that company. Glassdoor has people rate the difficulty of the problems and whether or not they got the offer as well as write a blurb describing the question or their experience. This way you can get some idea of the difficulty of questions they ask and what kind of questions they give.
Come up with questions
Interviewers often allocate at least 5 minutes at the end of the interview to ask them any questions about the company or their role. Definitely go into your interview with some questions prepared — this is a great opportunity to learn more about the company to see if it’s a good fit for you. I also often like to follow up by asking what a better or more optimal solution might’ve been or how I could’ve improved.
During the Interview
Reiterate the task
The first thing you should do after the interviewer presents the problem to you is restating the problem in your own words to clarify that you understand it properly.
After you understand the problem, be sure to ask detailed questions about how the program should perform under edge cases or anything to clarify any uncertainties. This shows that you’re a critical thinker and that you’re able to consider various scenarios.
Some good questions to ask are “can I assume this…?” or “how should the program perform under this case?”.
Develop algorithm / solution
Now that you understand the problem and the task ahead, you now need to formulate your algorithm. This does not mean that you should start coding.
This is where you verbalize your thought process — consider different possible solutions to the problem and compare their time and space complexities. Talk through your ideas and explain them in detail with your interviewer so that they understand what your algorithm is.
What if you have no idea how to solve the problem?
That’s totally OK.
Don’t panic! This is more common than you think — this is where you work with the interviewer to solve the problem. Most interviewers enjoy back and forth brainstorming and actually prefer the ideation process to be more of a discussion about how to solve the problem. If you’re struggling to get started, verbalize what it is you’re having trouble with and maybe some preliminary ideas even if they may not work. Your interviewer will hint and nudge you in the right direction.
Run idea on an example
To clarify exactly how you want your algorithm to work, pick an arbitrary example input, and run your idea on it and showcase how it would work.
Now that you have your idea set to stone, it’s time to start converting your ideas into code. Don’t fall into the trap that many fall into, which is to go mute as you begin coding. You should still be speaking out loud to the interviewer describing what it is you’re doing and why — stating invariants along the way is a good way to show that you know exactly how your program is performing.
Your coding ability is not the most important part of the interview. In fact, most companies don’t care if you mess up the syntax or don’t remember how to do something in a specific language because they care more about the thought processes. That being said, showing that you can easily convert ideas into code is a very important and impressive skill to have.
Now that you’re done writing your program, it’s time to run some tests. Pick up some useful test cases: maybe a standard one and a couple of edge cases. Testing is a very important aspect of software engineering and by initiating this process yourself it goes to show that you have a good habit of testing your code.
As mentioned before, coding interviews are challenging and require a lot of different skills in order to succeed. However, with enough practice, they’ll become less and less intimidating. Just remember that the key is communication — a person that can code out the solution in a few minutes but doesn’t say a word to the interviewer is a lot less likely to get the offer than someone who may struggle a bit but communicates their thought process well.
I hope this article helps make interviews seem a little less daunting and helps you figure out the best way you can prepare yourself to perform at your best for your dream company.
Best of luck on those interviews