Disclaimer: I am not a coding interview question master! I’m in the process of applying for Software Engineering jobs and have been through some virtual tech screenings and interviews. This is not an end all be all for solving coding questions, but merely a guideline to help newer individuals feel confident in solving them.

The Tech Interview

When applying for Software Engineering positions, and other similar positions, it’s very common for the interviewer to ask you to solve a coding question. Solving this question typically requires knowledge of data structures and algorithms, and to a newcomer this can be quite intimidating. This process was pretty daunting for me at first and I feel like I waited too long to start solving these questions. I don’t want others to make the same mistake so I want to share my process for solving these questions to help people gain the confidence to start.

The goal of the coding interview question is for the interviewer to gain a sense of your problem solving abilities. This means you’ll have to **practice sharing your ideas out loud. **I recommend talking out loud while solving these questions to get into that habit, or if you have a friend/colleague try performing a mock tech interview with them.

Before I get into my steps that I typically follow, there are a ton of free resources on YouTube that provide more in depth knowledge on coding interview questions. One great resource is Nick White on YouTube: https://www.youtube.com/channel/UC1fLEeYICmo3O9cUsqIi7HA .

He has a lot of videos explaining different coding interview questions on LeetCode.

Step 1: Pay Attention to the Input and Output

I know it sounds so obvious but this is something I didn’t do well enough when I started. I would read the prompt, and immediately try to outline an algorithm. With this process I would run into problems with edge cases and it would usually lead to a whole mess of if else statements. Then optimizing the algorithm became a whole separate problem.

Write down some of the examples that they provide, the input and expected output. This will give you an idea of some of the edge cases and usually the problems will provide constraints for the algorithm below the examples. After writing down the examples, ask yourself if you’ve seen a problem, or input-output, like this before. If you have, you’ll most likely be able to use a similar algorithm to solve this problem. Doing this will help you understand the problem you’re solving and could provide a method to brute force a solution.

#programming #coding-interviews #interview #computer-science #leetcode #visual studio code

A starting approach to solving coding interview questions.
2.65 GEEK