Skip to content

Coding Interviews

2 min

Coding interviews are a staple component of software development engineers hiring (and affiliated roles). Below I share my top five tips to ace such interviews:

1️⃣ Ask Clarifying Questions: Coding/problem-solving questions are intentionally vague and help the interviewer assess the candidate's ability to deal with ambiguity. Be sure to start with some questions that help you narrow down the scope of the problem to be solved and the complexity that your solution must accommodate. For instance, if asked to solve a problem involving an array of numbers, you may ask "Are the numbers all integers?" or "What is the size of the input provided?". Jumping straight into coding without asking a single question is generally a red flag.

2️⃣ Talk your Solution through: Once you clarify the problem and as you are thinking about your solution, talk it out loud. This will help your interviewer gather essential data points on your clarity of thought and logical thinking. Pay particular attention to showcasing the why behind the code you are writing. For instance, I am writing this piece of code to help me determine if there are any duplicates in the given data structure or I am choosing to use a hashmap since I need to store and retrieve key/value pairs efficiently.

3️⃣ Consider Non-functional Requirements: While you may not have the time to address every non-functional aspect of the solution (e.g. scalability, efficiency) in the time allocated, your interviewer does need to observe you acknowledging and to the extent possible accounting for these. In coding interviews, specifically, space and time complexity are critical. While it is generally acceptable for your initial solution to be brute force, come back to optimize it and make it more efficient. Brushing over these important aspects of a solution (without even an acknowledgment) is generally a red flag.

4️⃣ Verify your Solution: Once complete, walk through your solution to validate it. This is an opportunity to address any edge cases that you may have missed (e.g. used > instead of >=, missed out on special handling of the last element). This demonstrates to the interviewer your attention to quality and detail.

5️⃣ Practice, Practice, Practice: There is no shortcut to readiness without practicing. Luckily, there are tons of resources available online from books (e.g. Cracking the Code Interview by Gayle McDowell), online platforms (e.g. Leetcode, HackerRank), forums/websites (e.g. Quora, Glassdoor), videos (e.g. YouTube), and structured courses (e.g. Coursera).

P.S: If you missed my earlier post on acing the system design interview, here it is:

👉 What are some of your favourite coding resources (whether for interview prep specifically or skill improvement in general)?