10 Mistakes to avoid when preparing for coding interviews

Pooya Amini
Geek Culture
Published in
5 min readAug 20, 2021
Photo by Sarinyapinngam on iStockPhoto

A quick online search leads to the reality of many candidates believing that from solving a large number of coding questions, their success in the coding interviews is guaranteed. Although practicing is indeed a requirement to get better at solving problems, the way you practice plays a significant role in the final performance.

In this article, based on my past interviewing experiences, I briefly discuss how to avoid common mistakes that can sabotage a candidate’s chance of a successful interview.

1. Memorizing the solution!

Memorizing the implementation is not uncommon among candidates and usually, the interviewer can pinpoint it very quickly. Imagine that after spending some time on a question, you get tired and seek the solution online. By merely memorizing the solution instead of fully understanding the algorithm, you confine yourself to the exact problem and will not be able to solve a modified version of the same question. Imagine that the memorized solution involves using a hash table but the interviewer asks you not to use any additional data structure. You might lose your confidence, get stressed, and become unable to think about other approaches.

However, it’s fine if you are solving a problem that requires an algorithm you have ample knowledge of. For example, you identify a problem as a graph problem requiring the topological sort that you are already familiar with. It’s still a good practice to implement your solution without having the code for the topological sort memorized. I’ve seen many candidates explain their correct solution to me but they are still unable to convert their algorithm into a working code.

2. Jumping to the solution right away

It’s not uncommon in the early stages of practicing, to be tempted to read the solution right away if the problem looks complicated. Regardless of whether you can solve the problem or not, thinking about a possible solution makes your mind stronger and allows you to better understand the correct solution.

3. Timing yourself at the beginning

In the first weeks of practicing, you are still learning. Timing yourself leads to anxiety and unnecessary pressure. This can prevent you from shaping the proper learning structure in your mind. Instead, just focus on learning and solving the problems in the first steps without worrying about how long it takes to reach a final solution.

4. Starting with hard questions

For many FAANG companies, the difficulty level of interview questions is medium-hard. When preparing for those companies, you might start practicing on problems within a similar tier of difficulty. If you don’t have enough preparation, you could end up memorizing the solutions instead of properly learning the basics of problem-solving. This can lead to disappointment because you then lack the appropriate insight to solve the problem without a shortcut. To avoid this, acknowledge that you are learning and start with easy questions until you feel comfortable moving forward.

5. Running your coding for debugging

Many online coding editors allow you to run your code on custom test cases before submitting your code to be executed against a large number of test cases. Well, this is not exactly how it works in a real interview. In many interviews, you are not even asked to run your code, but your code should be still flawless. If you rely on pressing “Run Code” to find and fix mistakes in your code, you are not achieving debugging skills. In real interviews, you should test your code with your test cases before letting your interviewer know that you are done. After writing the code, review it multiple times and try to construct good test cases. From here, you can then try to validate the output of your code before pressing the run button.

6. Underestimating the complexities

Sometimes, when you implement the right solution, you consider the problem as completed and move to the next one. Don’t forget that the first questions after you write the code in the interviews are about the time and space complexity of your solution. After implementing each solution, try to come up with time and space complexity for your algorithm and see if you can improve either.

7. Not reading all solutions

I highly recommend reading all the solutions even if your algorithm gives the expected output. Some other solutions are creative and provide an idea of how the same problem can be approached from different angles.

8. Focusing on a few topics

Choose a variety of problems to cover all popular topics including arrays, strings, queues, stacks, recursion, dynamic programming, graphs, trees, hashing, etc. If you discover that you need to brush up on a specific topic, aim to practice more questions on it.

9. Getting disappointed at failures

There are two stages where candidates can face disappointment: the early stages and close to the interview time.

In the former, as you are learning and facing challenges, you might be concerned that there is not enough time to prepare for the interview. Although the learning progress might seem slow at the beginning, you ramp up at a much faster pace as you practice more.

When it’s close to the interview time, if you are not able to solve some problems, you still might not feel well prepared for your interview. Regardless of the amount of practice achieved, it’s normal to fall short in some areas. In an interview, the interviewer is assessing your problem-solving skills, not trying to make you fail the interview. How to clarify a problem and approach the solution plays an important role in the interviewer’s decision. Their responsibility is to lead you in the right direction. So even if you are stuck, do not panic! Try to communicate with the interviewer and re-think the problem with the given hints from the interviewer.

10. Focusing only on coding

The coding interview is NOT just about writing a working code. The interviewer assesses your data structure/algorithm knowledge and problem-solving skills in addition to how you have delivered the solution. This involves communication skills, testing and debugging, requirement gathering, and clean coding. Some companies like Amazon evaluate your leadership skills and culture fit through behavioral questions. Regardless of your performance on the technical part, you will not get the job you had dreamed of if you fail the behavioral aspect of the interview.

Conclusion — Practice effective practicing

When a recruiter approaches you to find a schedule for the interviews, you are probably given a couple of weeks (if not days) for preparation. Considering the time limitation in preparation for the coding interviews and the possibly high difficulty level of questions, you must spend enough time aligned with your current preparation level. This allows you to build a solid foundation. However, it’s also important to know how to practice effectively to make the most out of the short preparation time.

--

--

Pooya Amini
Geek Culture

Sr. Software Engineer at Meta (ex-Amazon/AWS). I write to share my experience regarding personal and career growth.