Cover photo by Mark Rabe
When I was asked to present to high school developers on the subject of technical interviews I did what any professional developer does to prepare, I turned to the internet. It's been about a year since I've done a technical interview and as I researched I revisited the idea that there was more to the technical interview than just answering a problem on a whiteboard.
Horror stories of developers having to answer brain teasers are still passed around and can definitely be spooky. Thankfully, it seems like the community is moving forward as interviewers are getting better at wanting to see your skillset and work-related abilities. These interviews are mainly an opportunity for you to show your thought process when faced with a new, sometimes difficult problem. I discovered that one particular soft skill was referenced over and over as being the most important part of the technical interview.
The best thing you can do as an interviewee is to communicate with your interviewer. They're there to get to know you and your problem solving skills. The more pertinent information you give, the more insight they have about you as a professional developer.
Be sure to ask any questions you have about the problem before you even start coding. Write down important information like the input/output expected, validation of the inputs, or if spacial/time complexity is important to the solution.
It’s easy to go silent when confronted with a difficult problem and while this is natural, it is not very helpful for the interviewer. You speaking about your thoughts helps them understand your skills and critical thinking.
How do you break down the different components? How do you arrive at a solution? Writing in pseudocode after you've written your notes will help with breaking the problem into smaller pieces and can be converted to actual code once you're comfortable with your logic.
“I’m going to store this data in an array.”
Cool, you've heard of an array, but expand on why you're using it.
“I’m going to store this data in an array because I already know that the input given is sorted and lookup would be efficient with this data structure.”
Great! This answer shows what data structure you're planning on using and why you believe it's the best one to use.
I know, you may have a hard time solving it just once but hear me out.
Few problems only have one solution and focusing on one way to solve a problem misses a major opportunity to prove your know-how. Most likely the first idea that comes to mind will be a brute force answer. Open up the conversation by mentioning your initial thoughts, an idea about a more efficient answer, and your plan on returning to the problem for refactoring later. This is extremely valuable as it shows that you recognize the solution can be improved upon.
Let's say you're able to answer the problem with a brute force method. Once complete, test it with edge cases that come to mind. Ask your interviewer if there's time for you to refactor and if not then explain how you would if you had more time.
If you can't think about a secondary answer then that's ok. Continue practicing answering algorithmic questions and study when you can. Interviewing is a skill on its own and practicing will only make it easier.
Try not to answer the question with "I don't know". You're a human, it's ok to not know everything. The interviewer (hopefully) doesn't expect you to be perfect, what they do want is someone who doesn't quit on the problem.
A better answer would be “I don’t know how to do that, but here’s how I would go about figuring it out”. This gives you the chance to explain your learning process and that is valuable information for the interviewer to know!
No matter the company, from brand new startup to Fortune 500, these steps are integral to communicating your knowledge in a technical interview. Here's a simple process on how to go about answering the question.
If you can, practice whiteboarding with a friend! This can be beneficial for you improving your communication skills and practice the above steps while coding in a safe space. I believe that our greatest resource is our peers and there's no better way than to learn from each other.
Thank you so much for being on this platform. dev.to is really my favorite and I'm so happy that I get to contribute. I couldn't have written this post without the plethora of resources I found online.
There is so much material available that I've made a list of my favorites. I've included different mediums such as articles, videos, and practice questions. I hope that one of these will match your best learning style.
The Ultimate Guide to Acing Your Technical Interview
The Best Whiteboard Interview Advice I Ever Received
Decoding the Front-end Interview Process
5 Smart Moves to Make in a Technical Interview (That have nothing to do with coding)
Hackerrank Interview Preparation Kit
How To: Work at Google - Example Coding/Engineering Interview
CSDojo - Coding Interview Questions & Answers Playlist
6 Dynamic Programming problems and solutions for your next coding interview
The Interview Study Guide For Software Engineers
My Google Technical Interview Cheat Sheet
11 Mistakes to Avoid On A Technical Interview
Cracking the Coding Interview Playlist