To pass data science and machine learning coding interviews, focus on high-ROI topics (arrays, hashing, two pointers, sliding window, linked lists, binary search, stacks, trees, heaps, priority queues, and graphs) and practice problems first before learning theory, using a consistent daily routine with accountability to build problem-solving skills effectively.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
How I Mastered Data Structures and Algorithms for ML (In 6 Weeks)
Added:Since 2024, I've passed over 90% of coding interviews. [music] And that's not because I'm some sort of genius. In the machine learning and data science space, a coding interview is normally a data structures and [music] algorithms problem in either le code or hacker rank. And over the last couple of years, I've learned how to gamify my prep for these interviews through specific tactics and also practicing certain questions. So in this video I want to break down exactly how I mastered data structure algorithms in just 6 weeks.
Let's get into [music] it.
The first step is actually quite counterintuitive and it's actually to stop trying to learn data structures and algorithm. Now for those of you unfamiliar with what data structures and algorithms are, let me give you a quick definition. So data structures refers to organizing and storing data so it can be accessed and modified efficiently.
Algorithms stand for or are defined as step-by-step procedures or sets of rules for solving a problem or performing a task. And together DSNA or data structures and algorithms is a study of how to structure data and design efficient methods to process it. If you did a computer science or computing based degree at university, you would have likely had a module based on data structures and algorithms. Now, unfortunately for the data science and machine learning space, most of us come from other STEM backgrounds like physics, maths, engineering, economics, etc. And if you come from that background, you naturally need to learn what data structure algorithms are from a theoretical standpoint, right? At least you would think. And so you would do tutorials, read textbooks, and you probably very likely used Neat codes, right? Neat code, in my opinion, is by far and a way probably the best resource to study the concepts. This is exactly what I did when I was trying to learn uh data structure algorithms for le code interviews. In fact, in my medium blog, I literally wrote all the different types of data structure algorithms whilst I was taking Nico's course. So I was doing this course and I was writing about what I was learning to solidify my understanding. Unfortunately, this simply didn't work. I still bombed interviews and I still struggled to solve to some because doing all this theoretical practice and understanding and kind of like just learning the learning DSNA is not actually what you need to do in order to pass the interview. It's like wanting to learn to play tennis and learning all about the technique and how to swing a racket, but never actually [music] taking the plunge to hit the ball, which is basically what the whole game is about. And the same goes for le code. I wasted so much time learning the theoretical details, even blogging about them because it felt productive. But in reality, I wasn't actually getting my hands dirty and wasn't actually learning through doing the actual thing I need to do, which is what's tested in interviews. So what I did is complete reverse approach. I started doing the problems first and then afterwards if I couldn't find solution or my solution wasn't the best I would actually look at how do I actually solve it and then learn the theory after the fact. In general this was my approach. So I would spend 30 to 60 minutes per day on two problems for about 6 weeks. I would then give myself 20 minutes to solve each problem. And if I couldn't do it in that time frame, I would use the remaining 10 minutes to look through the solution. When looking through the solution, I would focus on learning the pattern, not just the answer. And then I'll close the solution and try to solve the problem. Again, this kind of reverse approach transformed my DSNA skills and my leak code and interview performance because I was learning, like I said, through doing and I was actually pulling my brain and mind through a mental sweat. I wasn't doing courses, videos, tutorials, which again felt productive, but it's just procrastination from actually doing the thing.
>> [music] >> And I didn't just practice any random question using this approach. I only challenged or I only challenged myself against certain topics which I'll explain now in the next section.
So when it comes to data science, machine learning, coding interviews, we don't need to have as an extensive knowledge of data structures and algorithms as software engineers. Even if we're going for senior positions, in reality, only certain topics appear in the interviews for us, which are arrays and hashing, two pointers, sliding window, linked list, binary search, stacks, trees, heaps, and priority cues, and graphs. I want you, if you're looking to prepare for these types of interviews, to focus on these topics only. Everything else is a complete waste of time because they rarely appear in interviews. Things like dynamic programming, tries, [music] bit manipulation, sure they are somewhat important, but they're very hard to learn. And that time you spend learning those topics can be spent elsewhere on the job application process [music] to get where you want to go, which is ultimately getting a role. Like don't spend that hours learning those topics because they're so low ROI compared to the other ones I just mentioned. We are deliberately being selective about the topics we choose because we are choosing the topics that appear the most in interviews. To this day, I have only ever practiced 40 LEO problems. That's right, 40. [music] And these 40 are the highest ROI problems that's allowed me to pass, like I said, over 90% of coding interviews since I learned this kind of hack, I guess you can call it. If you want to see those 40 problems, I've got a whole database or table of these exact problems that you can find linked in the description below to help you with your preparation. So, if you're looking looking to get a job, just literally practice those 40 problems on repeat and that's all you need to do.
Learning to solve coding and data structure algorithms problems [music] isn't actually that hard. All it requires is the right strategy which I mentioned earlier, focusing on the right problems and also the consistency. Now the last one is most important because without consistency you're basically just the no hacky system or certain questions is going to get you to become good at interviews, right? I have clients or people come to me that say, "Hey Eagle, I've got an interview tomorrow. How do I prepare for it?" You know, if it's a coding interview. And I tell them you shouldn't. Like if you're trying to prepare for Python or coding interview one day before, it's just pointless. You're not you're not going to do well in it. It's like you can try, but it it's just [music] not even worth your time. You're better off just sleeping and having a good rest and then actually practicing. So, you know, it's like we all kind of know what we need to do. It's just the discipline and accountability that that throws us off.
Again, if we go back to a different analogy of fitness, right? You know what to do at the gym. You know you need to go to the gym. So, why don't you go?
because you know you know what you need to do and it's like it's not as if you have a knowledge problem, you have a discipline problem, right? And the same thing goes for lead code. You know the questions now that you need to answer, you know the process you need to follow to practice, you just got to do it consistently. And the way you have accountability is simply just having someone in your corner. I implored or sorry apply the same kind of concepts. I have my mom every week text me saying, you know, hey Eagle, have you done your le code practice this week? having someone reach out to me and also the fact it was my mom meant I didn't want to let her down just kept me accountable. And I do this to all my clients. I literally reach out to them every single day, you know, if they want me to um if they if they're practicing lead code just to ask them like, "Have you done your prep?" And they all say how invaluable that is because just having someone that's just on you every single day means like, "Okay, I've got to do this because I've, you know, I've got accountability here." And it's amazing how that little thing can make such a big difference. So my task to you is that now you know the process and the tools and the frameworks and the questions to practice. I want you to reach out to someone and just ask them every single day, hey do you mind reaching out to me just to ensure that I've done this work. It's really really that simple. But you know, practicing lead code on its own and smashing through these interviews is not the only thing you need to do in order to get a data science or machine learning job.
There are so many other things you need to be good at like dialing in your resume on LinkedIn, understanding how to network for referrals and uncover hidden opportunities and also how to practice other interviews like behavioral m machine learning system design, the recruiter screen. There's a lot more to this process than simply being very good at lead code. And if that sounds like a lot, that's because it normally it normally is. But if you want to speedrun your journey, then I recommend you apply to code to careers. This is my coaching program where you'll work personally with me and my team to land your dream data or machine learning job in just 3 to 6 months. And the average salary of people we've placed is $130K.
In this program, we will transform and rebuild your resume in LinkedIn completely from scratch so it actually stands out. We'll build you a custom referral generation system so you can land 3x as many interviews. We'll transform your interview skills by conducting mock interviews until you're overprepared for every interview you will get. And finally, we'll teach you how to effectively negotiate so you don't leave tens of thousands of dollars on the table. On screen here are some recent results we have gotten from people in the program and it's just you know I can't express like my gratitude and like how happy I am when someone gets a role and we've actively helped them reach their dream outcome. It's just the feeling is completely unparalleled. So if you're interested in landing your dream data or machine learning job this year then click the link in the description below and I can't wait to speak to you. See you soon.
Related Videos

TOP 15 Data compression Interview Questions and Answers 2019 Part-2 | Data compression | Wisdom jobs
wisdomjobs
281 views•2019-06-28

CTS 158: 802.11w Management Frame Protection
ClearToSend
4K views•2019-02-04

NDSS 2019 Send Hardest Problems My Way: Probabilistic Path Prioritization for Hybrid Fuzzing
NDSSSymposium
496 views•2019-04-02

How realistic is Cities: Skylines?
CityBeautiful
159K views•2019-02-14

GUIs & TUIs: Choosing a User Interface for Your Python Project | Real Python Podcast
realpython
2K views•2025-04-04

The OSI Model - Explained by Example
hnasr
225K views•2019-05-12

Cloud Computing - Introduction
elithecomputerguy
98K views•2019-10-07

From Traveler's Dilemma to Dynamic Routing | Demystifying Networking
IITBombayJuly
5K views•2019-08-04
Trending

2.4 BILLION Records Got Leaked...
DeepHumor
15K views•2026-07-22

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23

Should I buy a Sawmill?
essentialcraftsman
29K views•2026-07-22

Americans Confused in Australia for 17 Minutes Straight
IWrocker
17K views•2026-07-23