Introducing Coding drills!!!

Leetcode problems can finally be useful in real life!

Thabiso Magwaza
CodeX
4 min readJun 16, 2022

--

Photo by Karsten Winegeart on Unsplash

After two years and six months of working as a professional software engineer, I recently found myself in a position where I might have to change employers. Changing employers would mean finding a new job and you know what that means… Data structures and algorithms (DSA) skills tests. Yay😒!

At first, I wasn’t even prepared to practice them. Over the past few years of working as a software engineer, I haven't once found myself having to reverse a LinkedList or traverse a BinarySearchTree! Why should I be assessed on skills that are not relevant to my day-to-day job when applying for a new job? Right!? And damn straight! I just started putting myself out there without opening up a single leetcode question. It wasn’t until I got into the radar of Amazon that I thought, well, now I have to practice the DSA questions. There’s no way I’m getting an offer from one of the famous FAANG companies without going through some rigorous DSA practice!

My Amazon prep strategy

I got an email requesting me to pick a date for my phone screening interview with Amazon and I decided to choose a date that was two weeks away. I thought that this would give me enough time to revise DSA as well as practice some questions without dragging the whole process on for too long. I also decided to purchase AlgoExpert.io simply because it has video explanations of their solutions, just in case I get stuck.

The plan was to practice every day by doing as many of the questions as possible before the day of the interview. I’d start off with their DSA refresher ( god knows I needed one ) and then I’d ease my way into solving the problems. Starting with the easy ones to build confidence and then gradually working my way to the medium, hard, and very hard problems!

A harsh realization

DSA problems are hard! For the first few days, I found myself struggling through the easy questions, sometimes only managing to complete one a day, and needing the video explanation to help me out. Needless to say, my pride and confidence were shaken! I think what shook me the most is that a lot of these problems are not strictly DSA problems in particular, they’re just problems that happen to have one or more software solutions. So you’d think that as a more experienced software engineer, I would have become better at solving software problems over the years right? Wrong! Working professionally as a software engineer has actually blunted my problem-solving skills. When I started to think about why that is, it made a lot of sense.

Working professionally as a software engineer has actually blunted my problem-solving skills

The problem with working as a professional

The problem with working in the corporate world as a software engineer is that a lot of the time, we don’t solve any problems at all! When you’re working on a large, mature software project, a lot of the problems have already been solved and the implementation details of the problems have already been abstracted away into some framework kind of tools. Corporate software is optimized to reduce friction and increase speed and accuracy, to essentially abstract away the problem-solving element of software engineering. As software engineers, we wind up just being responsible for calling certain high-level APIs and/or dragging and dropping ready-made components from a ready-made component library and calling it a day. It’s no wonder our problem-solving abilities eventually become blunt! It’s no wonder we eventually get bored and/or burned out. We’re always lifting way below our weight and that makes us weak.

Corporate software is optimized to abstract away the problem-sloving element of sofware engineering

Enter coding drills!

A week into my consistent practice of DSA problems, I started to get better and better. The most satisfying thing was the feeling I’d get when I solve a problem and all test cases passed on the first submission!😎 I’ve found myself feeling more energized, confident, and ready to walk head-first into solving any problem, not just the DSA ones. Solving at least one DAS problem just before I start work has made sure that my mind is always in problem-solving mode when I start work, and that has allowed me to work more efficiently and even have time to write articles like this one.

In closing

I eventually decided not to change employers after all. I realized that the problems I was having were actually internal and not external. I’m an engineer. When I’m not solving problems, I feel my skills regressing and that makes me sad and fearful about the future. I propose that we as software engineers can use DSA problems as a way to sharpen our problem-solving skills and give us that much-needed confidence that can propel us to greatness.

These software drills, as I’m calling them, can allow us to engage with different kinds of problems each day, therefore keeping our problem-solving faculties sharp and engaged! They also have the added benefit that we’ll feel confident enough to jump straight into solving any problem at any given moment. Be it a coding interview, or starting a side-hustle, or even creating tools and/or processes that’ll add more value to our current employers and possibly make our jobs easier and more fun!

--

--