DEV Community

loading...
Cover image for 7 steps to crack your next coding Interview

7 steps to crack your next coding Interview

Rahil Sarvaiya
Software Developer who loves fitness and reading. Trying my hand at writing to learn better.
・2 min read

Here are 7 Golden steps to follow to improve your chances of cracking the coding interview 💡

1. Clarify the question with the interviewer. ✔

Make sure you correctly understand the question before you even try and implement it.

2. Confirm the format of the input and the output. ✔

Understanding the input and output format can help visualize the problem better. It can also help in coming up with a solution to the problem.

3. Use test cases and run through a quick example. ✔

Running through an example clarifies with the interviewer that you have understood the problem well. It also gives you an example to test your code once you've completed coding your solution.

4. Brainstorm your approach with the interviewer. ✔

This helps the interviewer know what you're thinking and also correct you if you're on the wrong track. If you're stuck you can think of the various Data Structures that could help solve the problem and move ahead from there.

5. Discuss the Runtime analysis with your interviewer. ✔

If your solution is not the most optimal one, your interviewer will hint at there being a more optimal approach. You must discuss the time and space complexity of your solution.

6. Start coding your solution. ✔

Remember to TALK ALOUD while coding. Your interviewer can't read your mind. Hence, it is important to keep explaining what you're doing to make sure the interview understands your code as well.

7. Debug your code. ✔

Once you have coded your solution, go through it entirely to make sure your code does not have any bugs. Use the example test case in (3) and run that through your code. You must also test your code with certain edge cases, to make sure it won't break.

Next time you prepare for an interview, follow this 7 step process and it will improve your chances of landing that dream job of yours. 🚀


If you liked this article and would like to read similar work, be sure to follow me on Twitter where I’ll post updates about publishing my latest articles.

Please feel free to share your thoughts on this article in the comments section. If you guys have any suggestions regarding this article or on any other interview tips, I would love to know.

Discussion (0)