How To Pass A Live Coding Interview: 3 Tips From Our Community
Live coding interviews are often considered one of the toughest challenges during a recruitment process. They’re not only technically challenging per se, but can also bring about nerves and insecurities in the engineers undergoing them. Over the past year, I have spoken to hundreds of engineers both doing and evaluating these coding challenges. Although I am aware that challenges differ among companies, roles and positions, I’d like to share 3 (general) tips with you here. Hopefully these will enable you to nail a live coding interview in the best way possible. In subsequent contributions I will go more in-depth on specific topics related to these coding interviews.
Practice, practice, practice
As straightforward as it may sound, the most important thing to do is practice. Many engineers are of course experienced in coding, but not often do they code with an audience looking over their shoulder. We have experienced that this can make the engineer nervous, perform less well or even completely freeze on the spot. To avoid this from happening, it’s absolutely essential to practice and get used to the idea. Team up with colleagues or friends, have them interview you and do live coding challenges together. Also, during these preparations, it could be a good idea to practice out loud. This could help catch mistakes and improve your explanation skills.
There are many resources out there that will help you in getting ready for the coding interview. One great platform is of course LeetCode, where you can pick from an expanding library of more than 190 questions, code your solution, and submit it to see if you’ve solved it correctly. Start off with the easy ones and gradually move on to the harder challenges. This will enable you to dust-off on data structures and algorithms, and will get you familiar with the type challenges you could come across during the actual coding interview.
Also, we highly recommend the book Cracking the Coding Interview (6th ed) by Gayle Laakmann McDowell. It includes thorough insights into the type of challenges you might come across, how to break these into manageable chunks, and which techniques you should acquire before the interview. It also has a handy collection of common interview questions and solutions for you.
Don’t jump straight in; Ask first!
When in the interview, many engineers tend to jump straight into the challenge, coding away from the get-go. Although an eagerness to show off your coding skills might push you into that direction, it’s better to first step back, take your time and discuss the problem at hand. Ask any questions you might have; share any doubts you might have. This will not only provide you with a more thorough understanding of what is expected, but will also enable you to avoid any (common) pitfalls during the challenge. Avoiding these pitfalls is generally rather easy if discussed beforehand. Reverting them during the challenge, however, is not.
Just make it run!
During the interview, no one truly expects you to write a code that’s 100% correct. The most important thing is to have a code that runs at the end of the challenge, even if the solution itself is sub-optimal. During the challenge, demonstrate how you think about the problem, how you break it into manageable chunks, and how you work towards the solution. Make it performant and demonstrate you are capable of producing a well thought and designed solution. Keep it simple; don’t over-engineer. You won’t have the time for it, and chances are you complicate yourself or get stuck. Also, as long as you make sure the code runs, you can always still describe and discuss more optimal solutions afterwards.
Special thank you to the Try Catch expert community for their contributions.