Teaching people how to effectively prepare for coding interviews, I often get comments like this one
I get where this person is coming from. It's really frustrating to go into an interview and feel like you're being asked some toy problem that has absolutely no relevance to your actual job. You go into your interview and, especially if you're more experienced, all of that past experience seems to just not matter. It all comes down to whether you can invert a binary tree or whether you can implement Dijkstra's algorithm.
And maybe they ask you one or two behavioral questions and you get a chance to share a bit of your experience. But at the end of the day, you know that you are going to be beaten out by that person who has just spent the last four years grinding LeetCode problems and can solve any problem in like 10 minutes.
But here's the thing, coding interviews just aren't going away anytime soon. Yes, there are more and more companies that are not asking coding interview questions. And if you don't want to prepare for coding interviews, that is absolutely a viable option. There are lots of lists of these companies out there that you can refer to.
But if you want a job at one of these top tech companies that is asking coding interview questions, you don't have a choice. You have to prepare for coding interviews, whether you like it or not. And this is where your mindset makes all the difference.
If you're going into coding interviews just thinking ‘I'm not getting anything out of this, the only thing I'm doing this for is to land that job.’ Then that's going to be your reality. You're only going to get out of it what you think you're going to get out of it.
But the fact is that there's actually a lot that you can get out of preparing for coding interviews that will make you a better engineer, that will make you a better learner in your life, and that will give you results outside of just interview prep. I want to share with you four specific lessons that you can get from preparing for interviews. And if you shift your mindset to capitalize on these, it can really help you grow as an engineer – and grow as a learner throughout your career.
Shift Your Mindset
The first skill that you can learn while preparing for coding interviews that is really valuable throughout your career is learning how to shift your mindset.
I was speaking with a student the other day, and he said that he was trying to shift the way that he was viewing his coding interview prep from ‘I have to prepare for coding interviews' to ‘I get to prepare for coding interviews.'
This is such a simple mindset shift, but think about how different that is; think about how you're going to approach something differently if you go in as an obligation versus going in as something that you want to do.
If it's an obligation you're going to put in the bare minimum. You're going to do the thing that you have to do. And then you're going to give up very quickly, move on, go do something else.
Consider that you were solving a LeetCode problem. In one case you might say, okay, I'm stuck on this problem. I'm going to go look at the solution. You read through the solution. And you're like, okay, that makes sense. Good enough. I'm going to move on, go do something else. That's the case where you're saying, I have to prepare for interviews.
Now imagine an alternative case where you say, I get to prepare for interviews. You're going to go solve that same LeetCode problem, but when you get stuck on it, you see it as a challenge, you see it as an interesting puzzle for you to solve.
When you're stuck, you look for ways in which you can improve. You look at the solution potentially, but you spend time on it trying to understand, okay, why does this work? Why didn't I come up with this solution?
And by going through that process and really exercising your brain in that way, that is how you learn. That is how you get the best results. But that's only something that you do if you shift your mindset to ‘I get to do this.’ If you find the joy, you find the excitement in the project that you're doing, then that is how you see those results.
Ultimately, when it comes to making these mindset shifts, there's no magic to it. It's just practicing and getting used to the idea that how you initially perceive something is not necessarily how it is. It's telling yourself, I'm going to find the excitement in this. I'm going to find the thing about this that is interesting and I'm going to highlight that in my head.
It's not going to be easy at first, but the more you practice it, the better you're going to get at this. And this is going to apply to anything that you have to do throughout your life. Any time you're learning a new skill that is hard, and any time you're working on a project and you're struggling with it, if you use this mindset shift, it can make it so much easier for you to make progress and see those results.
Learn to Do Hard Things
The second skill that you learn from coding interview prep is learning how to do hard things.
Fundamentally, most things that we do that are rewarding are not going to be easy. If you wanted to start working out regularly, that's not going to be easy. If you wanted to learn a new skill for fun, like you wanted to learn how to play poker and compete successfully, that is something that is hard. It's not going to be something where you just sit down one day and you're magically good at it.
And coding interviews are an example of this, where you have a very specific reason for accomplishing that. You have a very specific reason why you are preparing for interviews that's going to keep you motivated in the way that you might not be motivated for some of these other skills.
Now, as you go through this process, what you learn is that meta skill of how do I develop the skill to do hard things? What is the order in which I need to approach the tasks? For example, do I want to start from easy and work to harder? Or do I want to jump into the deep end and just struggle and figure it out for myself?
This is something where, depending on you as an individual, you might feel like what approach works better or the other approach works better. And by going through these coding interviews, it gives you room to experiment in this contained environment so that you can understand what works for you and what doesn't work for you.
The same skills that you use to learn how to prepare for coding interviews. that you will use to learn, to solve these problems effectively, are skills that are going to apply any time you're trying to learn any other new skill. Maybe you want to learn a new technology for your job so that you can level up your career. Maybe you want to learn a new sport, whatever it is, being able to apply these skills and understanding how you learn is an incredibly valuable tool that will help you throughout the rest of your career and your life.
Think Strategically
Now, those first two benefits of coding interview prep were not specifically related to coding interviews or software engineering. They are just general benefits of learning any new skill, but I want to also highlight two specific benefits to software engineering and to your career of preparing for coding interviews. And the first one is learning how to think through hard problems strategically and in a structured way.
Coding interviews are basically just problems that we need to solve. And there are processes that we can use to problem solve more and less effectively, the same strategies that you use for problem solving in a coding interview are strategies that you can use when you get stuck on a project at work.
Let's say for example, that you don't really understand how something works that you're supposed to be implementing. You don't really understand what that proper behavior should be. There are lots of skills that we use in coding interviews that translate directly to that. How do we ask intelligent questions about what that behavior is supposed to be and how is this thing supposed to work? How do we consider different possibilities and explore what are the right ways to approach a problem?
When something is technically really complex, how do we dig into that? And how do we break down that problem so that we can come to a working solution?
So much of software engineering is solving tricky problems. And if you are a person who is able to solve those really hard problems that other people aren't able to solve, then that is an incredibly valuable skill.
And this is something that by solving these coding interview questions, and by going through the process and learning how to think strategically you'll become increasingly good at and able to apply throughout the rest of your career.
Go Back to the Basics
And finally, the last benefit of coding interviews is that it forces you to go back to first principles.
First principles is the idea that we go back to those foundations. We go back to those base level data structures and algorithms, go back to, okay, what is the definition of time complexity? And by going back to that very basic level, it allows us to understand our more complex ideas in a much better way.
A lot of times we take this linear process of, we start at the simple and we get more and more complicated, but then we never go back to the beginning. We never go back to those first principles because we feel like we already know them.
And what happens is we start to forget those as we're looking at more and more complex problems. We forget about those basic details because we just haven't thought about them in so long. The muscle of using these basic data structures atrophies because we're used to using more complex tools where a lot of that's getting abstracted away.
Now, a lot of the time in software engineering, you're not going to be like implementing a tree directly, or you're not going to be using these data structures in a direct way, but taking the time to really dig deep, understand these data structures, understand time complexity and how it really works on a deep level is going to make you more informed as you go through and use the tools that are available to you.
Imagine, for example, that you wanted to come up with an efficient searching algorithm for your database. It would be really helpful if you have some memory of how some of these algorithms work, what some of these techniques that you can go back to and reference. This is just a simple example of how going back to those first principles is really valuable for taking your interviewing and taking your just software engineering skills in general, to a whole different level.
Now, at the end of the day, I'm not saying that coding interviews are the best way to develop your skills as a software engineer. I think it's pretty obvious that there are better approaches out there. However, coding interviews are one of those few things that you are going to need to do to develop your career.
So if you shift your mindset and approach coding interviews as an opportunity to develop these skills, it's going to make that much more productive. And it's going to allow you to just get much more value out of this thing that you have to do regardless.
Now, if you're ready to start diving into your interview prep and make it really, really productive, go ahead and check out how to put together a clear interview prep roadmap here.