# How Learning Data Structures and Algorithms Helped Me Ace My Coding Interviews

10/11/2018

I remember walking into my first technical interview for a software engineering internship. I didn’t know what to expect, for I did no preparation whatsoever and assumed whatever I learned in class up to that point would carry me through the interview.

Oh, how I was wrong.

I walked into a room containing one other person and a whiteboard. The attention was on me.

The interviewer asked me to write a program that, given a start position and an end position in a matrix (a two-dimensional list or array), would find an optimal path from the start position to the end position.

Not having taken an algorithms course yet, I wrote a program that went through most values in the matrix to find the shortest path.

The interviewer then asked me how I would optimize the program.

I stood there dumbfounded.

Not knowing how to solve the problem at hand, I asked the interviewer for a hint (totally ok to do this if you are ever stuck in a technical interview!). But even with the hint, I was confused. I failed the technical interview and didn’t get the job.

Although the interview was demoralizing, I felt that with the right preparation I could go back and tackle the challenge. The following semester, I signed up for a data structures and algorithms course.

After taking the course, I reflected back on that first technical interview. I realized that with the use of an A* algorithm, that question wasn’t hard at all! I could have optimized my move at every cell in the matrix to find the shortest path. Not knowing those data structures and algorithms cost me a job.

Not only did the course give me a better grasp of programming fundamentals, but it also made me think of the world differently. All of a sudden, I started modeling and navigating the world through an algorithmic lens.

I would represent my walk to class as a graph of vertices and edges and use the A* search algorithm to figure an optimal path. I would use binary search to search through the library bookshelves until I found the book I wanted, as opposed to looking through the books one by one.

Furthermore, knowing these data structures and algorithms also helped me build some cool stuff on my own! I built an application similar to Google Maps that would route the shortest distance to my classes. I also helped build a code style analyzer that uses a clustering algorithm to automatically provide hints and improve people’s code! The possibilities were truly endless.

Learning how to apply data structures and algorithms not only provided me with the necessary knowledge to start a career in software engineering, but it also instilled a confidence in me to reach out again and try to conquer technical interviews.

The year following the course, I once again began applying for software engineering internship positions. I made it through to some technical interviews and began applying what I learned in class to the problems they gave me.

I was asked variations of traversing graphs, sorting through lists, searching through datasets, and more. I was able to show off my ability to think optimally, and this algorithmic thought process landed me a couple of jobs, including one at Codecademy.

At Codecademy, I was honored to work on a team creating the Computer Science Basics: Data Structures and the Computer Science Basics: Algorithms Pro Intensives.

These courses teach the underlying principles of strong programming fundamentals, so you can apply them in your own job searches and careers. I hope you take the courses, and I am excited to see where your learning journey will take you.

7 articles

# How To Write A Programmer Bio (With 6 Examples)

09/05/2024
8 minutes

The simple formula will make writing a bio feel like no big deal.

# How to Estimate the Amount of Time You Need for a Project

09/03/2024
7 minutes

How long is a piece of string? Estimating software engineering work is part science, part finger in the air — here’s some practical advice to get started.

# Over 97% of Devs Use this Tool & You Can Learn it for Free

09/03/2024
3 minutes

A new survey from GitHub looked at the everyday tools developers use for coding.

# How To Tell If You’re “Proficient In Excel” & How To Get Better

05/30/2024

Plus, common Excel interview questions and how to answer them.

# What Boosting Retention Looks Like During “The Great Resignation”

10/21/2021

People are leaving their jobs in record numbers. But as the “Great Resignation” continues on, employers have an opportunity to better support their teams and ultimately boost retention with an increasingly popular solution.

# How To Make a Web Developer Portfolio

05/25/2021

Need help creating a web developer portfolio? Learn what to include (and what not to include) to make a great first impression with employers and clients.