How I Mastered Data Structures and Algorithms
Key Takeaways
Tech With Tim explains how to master data structures and algorithms efficiently, covering topics such as choosing a good programming language, learning theory quickly, practicing with DSA questions, and building confidence through mock interviews.
Full Transcript
Today I'm going to explain to you how I mastered data structures and algorithms quickly without hating my life. Now I say that because a lot of people that get into this topic do it completely wrong. It takes up a massive amount of time and they just hate doing it. It's brutal. And let's not lie, no one enjoys data structures and algorithms. But there's a way to do it that's a lot less painful that I want to break down in this video. Okay, so let's get right into it. First things first, do yourself a favor and pick an easy language to do this in. Now, most people are going to be learning this either because they're in a computer science degree or because they're preparing for technical coding interviews. Now, I'm mostly speaking to that latter group there, people that are doing this because eventually they're going to be quizzed on this type of stuff and have to answer these le code style problems. So, I highly recommend use a language like Python when you're learning this and when you're going to be practicing these DSA style problems. The reason for that is it's a much more elegant language. It's way easier to write code in it and it's much easier to follow. So if you had to answer a question in Java, for example, it's going to take you just longer to write the code due to the syntax style of Java. Doesn't mean Java is a bad language, but for the purpose of passing coding interviews, you're just doing yourself a favor if you pick a language like Python. Okay? Even if you don't use it or it's not your primary language, it's very easy to learn enough of it to be able to answer coding questions in it. So I recommend that you pick something like Python, maybe even something like JavaScript. Anything that has relatively simple syntax and dynamic typing is going to help you a lot. Okay, moving on. Step number two. Now, I learned the theory quickly. A lot of people spend months learning the theory of data structures and algorithms. That's not necessary. There's three main things that you need to learn or kind of three main topics. I'll quickly go over them, but the point is don't spend too much time here. You need to understand the algorithms and data structures. Know the time complexity of the operations, but that's about it. You don't need to implement these from scratch. Sure, if you have extra time, it's a good idea, but it's not necessary. You're not going to be asked to write a heap, or at least very unlikely that they'd ask you to do that. It's more so understanding how to use the data structures and what the time complexity of the operations are. So, what I did is I started by learning bigo notation and time complexity analysis. This is the most fundamental thing. You need to understand this. Then I started looking at data structures. So I won't go through an entire exhaustive list because there's a lot of resources online that cover those better than this video can. But things like stack, Q linked list, trees, etc. I skipped the super complex stuff. So things like B trees, for example, red black trees, AVL trees, tries, if you're going for more senior positions, maybe you need to know those, but in my case, for internship or kind of entry level roles, you're just probably not going to be quizzed on those. Then I started looking at algorithms. So obviously famous algorithms, your sorting algorithms, your searching algorithms and I didn't implement all of these on my own. I just understood what they were enough that if I were asked a question about them, I would know the time complexity or I would know that they exist. I looked at things like graph algorithms and then I started looking at some more niche algorithms that come up in coding problems a lot. So things like dynamic programming, greedy algorithms, things like the two-pointer approach, the sliding window, and again not memorizing these, but just knowing that they exist and having some basic theory understanding so that when I start getting into solving problems, I know enough that I can at least reference back to that topic and then learn it more by applying it directly. Now, in terms of how I learned these, I pretty much just searched for a bunch of resources online. I found a solid road map that walked through a bunch of those topics and then I followed it and I looked up YouTube videos and used websites like Geeks for Geeks. Now, quick pause here because you'll probably find this relevant. If you are a software engineer right now or you are looking to become a software engineer and something like technical interview prep is holding you back, then consider applying for my program, Dev Launch. In this program, we take on a very small group of developers. Yes, it is expensive. It's a high ticket program, but it's designed to give people one-on-one guidance to help them land their next role. And we've already had a lot of success. For example, we had a senior software engineer come in really struggling with this topic specifically. We gave him the correct guidance, helped him with all the mock technical interviews, and he just landed 180k per year role and is interviewing with Meta right now where we expect him to receive an offer because he's in the final rounds. We have a lot of other examples like that. But if you're serious about this and you want someone to hold your hand through this whole process, then you can apply from Dev Launch down below. We don't just do technical interview prep, but obviously that's relevant to this video. Okay, continuing. Let's get into my prep when it came to the questions. So, I saw so many articles online of people saying they did like 400 lead code questions or 300 lead code questions or even 200. That is insane to do that many questions. First of all, that will take you like four, five, six months unless you're doing five a day or something along those lines. And I want to tell you for myself, I only did 60 lead code questions and I did about 50 algo expert questions. Okay? So my process when I was practicing these questions first of all was to always emphasize quality over quantity. Now yes you do need to put in sufficient volume. I think getting to about 75 to 100 questions for most people should be enough if they're practicing correctly and picking the right questions. But for me I started with a platform like Algo Expert. Now this is before I worked for Algo Expert in case you guys think this is like a sponsor. I don't actually make any money if you buy that uh platform so I don't care if you use it. But for me, I liked that platform because it had really in-depth video explanations of all of the questions. Now, I think Lead Code may have those now as well. It's been a while since I did this. But for me, when I was starting out, I really struggled with these questions. Like, I could hardly answer some of the easy questions. So what I would do is I would struggle at a question, but when I wasn't getting anywhere at all and I had put in the time and I had struggled, I would go and I would watch through the video explanation and really make sure that I understood it and then reattempt the question right after to see if I could actually do it on my own. So that's how I started getting good really fast was failing essentially watching the solution and then not just moving on to the next question, but doing it again after watching the solution. And then I might even revisit it another time, maybe the next day to make sure that I actually comprehended it. So even though I only did maybe 50 questions, I would do the same question multiple times until I actually got it correct. Okay, so that was where I started with Algo Expert, right? But they only have maybe 150, 200 questions on the platform and by the time you get through 50 or 60, you've done a lot of the easy medium ones, which is what I was targeting for kind of the internship level roles. So after that, I switched over to leak code. Now, leak code is a lot more challenging in my opinion because you don't have the same level of guidance or the same kind of quality of video explanations, but it's good when you want to put in more volume. So, then I switched over to leak code and again, same thing. I would do the questions. I would try to check the answers, but it wasn't always as good as Algo Expert. And that's when I put in more volume. Now, I was typically doing about two questions per day when I was preparing. And again, I was making sure that when I did these questions, I was emphasizing quality, which I'm going to move on to next. Okay. So, while I was doing these questions and especially in those last leak code questions, I made sure that I was practicing like I play, which I think is the number one mistake that people make when they do these types of problems. You can do as many problems as you want, but if you don't emulate a real coding interview, you're not going to succeed when you're just thrown into that environment. Now, I did a lot of research online. I knew people in the space, so I knew I'm probably going to have to write this out by hand. I'm going to have to verbalize my solution, and I'm going to have to walk through this very strict framework that I actually made a video about, which I'll put on screen right now. So, what I did is when I answered these questions, I literally bought a whiteboard, put it in my room, set up my camera, and recorded myself pretending I was in an interview environment. So, I would solve the question actually on the whiteboard. I would speak the entire time. I would time myself. And while I couldn't do as many questions when I did this, I really got comfortable in this environment where when I actually went into the real interview, it was the exact same thing that I've been practicing countless times. So, in my room alone like a crazy person, I would do that and I would highly recommend you do that because it's going to expose to you really quickly the other parts of the coding interview that most people end up failing, right? That are related to the communication. All right. Now, after I did a bunch of reps sitting in my room like a crazy person answering questions, I decided I should do some real mock interviews. So what I did is I reached out to people that I knew. For example, Clement, you guys might know him from Algo Expert. We did a mock interview on YouTube actually with him and I did a bunch of interviews using a platform called Prampt. Now I'm not sure if that platform is still around. This was a while ago, but essentially you could go on and you can volunteer and you ask someone a question and then they ask you a question and you're kind of both, you know, acting as the interviewer and the candidate. So I did a bunch of those. I probably did 15 mock interviews just to make sure again I was really really comfortable and I was not just worrying about memorizing all of these algorithms but actually how I presented them and how I spoke through the problem which is where I see most people failing. So just make sure you do as many interviews as you can. I even had some of my friends who are non-technical ask me a question that I had prepared for them to ask me that I didn't know the answer to and then I ran through it and I kind of got their opinion as a non-technical person on how well they thought I did. Okay, so those are the main things I did to prepare. The last point that I want to put on here, which is the reason I believe I succeeded in all of the interviews that I did, because I didn't fail any of them, is that I had confidence when I walked into the interview. Now, the reason I was confident was because I knew no matter what happened, I had done as much as I possibly could to prepare. I put in the time. I studied correctly. I did this properly, right? I was putting in quality. I wasn't just kind of wasting my practice. And I knew that even if I failed this interview, there's nothing more that I could have done. I prepared as best as I could. If you have that in the back of your mind and you know no matter what happens, it's honestly not your fault. You've done the preparation, you've done what you can and the result will be what it will be, then I think you just have some underlying confidence and kind of the way you present yourself, the calmness you have wears off in the interview. And at least for me, that's what I felt happened. And I knew doesn't matter if I fail, whatever. It's all good. I move on to the next one because I prepared as much as I can and there's just nothing more I can do. So, I challenge you, get to that point before you walk into some of your interviews and just know in the back of your mind, you've done everything you can. And if if you fail, you fail. Is what it is. You move on to the next one, right? There's nothing to be worried about. You did everything that was possible. Okay, that's all I have for this video. Again, if you guys want assistance with this, this is exactly what I do in Dev Launch. I literally teamed up with someone who's an ex Google, ex Amazon employee who's given hundreds of these technical interviews, who's really nailing the process for our students in this program. If you want help, apply from the link below and I will see you guys in another video. [Music]
Original Description
Want to make real money with coding? I share high-signal insights on careers, monetization, and leverage in my free newsletter. Join here and get my guide How to Make Money With Coding instantly: https://techwithtim.net/newsletter
I'm going to explain to you how I mastered data structures and algorithms quickly without hating my life. Now, I say that because a lot of people that get into this topic do it completely wrong. It takes up a massive amount of time and they just hate doing it. It's brutal. And let's not lie. No one enjoys data structures and algorithms, but there's a way to do it that's a lot less painful that I want to break down in this video.
⏳ Timestamps ⏳
00:00 | Learn DSA Without Hating Your Life
00:24 | Picking a Good Language
01:30 | Learn the Theory Quickly
04:24 | DSA Questions
06:55 | Practice Like You Play
08:05 | Mock Interviews
09:10 | Having Confidence
Hashtags
#DSA #CodingCareer #SoftwareEngineer
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Tech With Tim · Tech With Tim · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
A* Path Finding Algorithm(Visualization)
Tech With Tim
Python Programming Tutorial #1 - Variables and Data Types
Tech With Tim
Python Programming Tutorial #2 - Basic Operators and Input
Tech With Tim
Python Programming Tutorial #3 - Conditions
Tech With Tim
Python Programming Tutorial #4 - IF/ELIF/ELSE
Tech With Tim
Python Programming Tutorial #5 - Chained Conditionals and Nested Statements
Tech With Tim
Python Programming Tutorial #6 - For Loops
Tech With Tim
Python Programming Tutorial #7 - While Loops
Tech With Tim
Python Programming Tutorial #8 - Lists and Tuples
Tech With Tim
Python Programming Tutorial #9 - Iteration by Item (For Loops Continued...)
Tech With Tim
Python Programming Tutorial #10 - String Methods
Tech With Tim
How to Overclock a NVIDIA GPU
Tech With Tim
Python Programming Tutorial #11 - Slice Operator
Tech With Tim
Python Programming Tutorial #12 - Functions
Tech With Tim
Python Programming Tutorial #13 - How to Read a Text File
Tech With Tim
Python Programming Tutorial #14 - Writing to a Text File
Tech With Tim
Python Programming Tutorial #15 - Using .count() and .find()
Tech With Tim
Python Programming Tutorial #16 - Introduction to Modular Programming
Tech With Tim
Python Programming Tutorial #17 - Optional Parameters
Tech With Tim
Python Programming Tutorial #18 - Try and Except (Python Error Handling)
Tech With Tim
Python Programming Tutorial #19 - Global vs Local Variables
Tech With Tim
Python Programming Tutorial #20 - Classes and Objects
Tech With Tim
Cool VBS Script to Prank Your Friends!
Tech With Tim
How to Overclock an AMD GPU
Tech With Tim
Best GPU'S For Mining Ethereum (2018)
Tech With Tim
Recursion and Memoization Tutorial Python
Tech With Tim
Ethereum Mining Rig - Hardware Guide
Tech With Tim
Pygame Tutorial #1 - Basic Movement and Key Presses
Tech With Tim
How to Install Pygame (Windows 8/10)
Tech With Tim
How to Trade Your Cryptocurrency (Bitcoin, Ethereum etc.) For Cash!
Tech With Tim
How to Mine Ethereum 2018 - WORKING (Super-Easy)
Tech With Tim
Microphone Comparison - $10 Mic vs $150 Mic (Blue Yeti USB)
Tech With Tim
Pygame Tutorial #2 - Jumping and Boundaries
Tech With Tim
Pygame Tutorial #3 - Character Animation & Sprites
Tech With Tim
Pygame Tutorial #4 - Optimization & OOP
Tech With Tim
OBS Studio Tutorial - Best OBS Settings
Tech With Tim
Linear Search Algorithm - Python Example and Code
Tech With Tim
Make Any Mic Sound AMAZING! (WITH OBS)
Tech With Tim
Binary Search Algorithm - Python Example & Code
Tech With Tim
Pygame Tutorial #5 - Projectiles
Tech With Tim
Pygame Game - Mini Golf
Tech With Tim
Pygame Tutorial - Projectile Motion (Part 1)
Tech With Tim
Pygame Tutorial - Projectile Motion (Part 2)
Tech With Tim
Pygame Tutorial #6 - Enemies
Tech With Tim
Pygame Tutorial #7 - Collision and Hit Boxes
Tech With Tim
Pygame Tutorial #8 - Scoring and Health Bars
Tech With Tim
Cloud Mining vs. Hardware Mining - 2018
Tech With Tim
How to Install Pygame on Mac OSX (Fast-Simple)
Tech With Tim
Pygame Tutorial #9 - Sound Effects, Music & More Collision
Tech With Tim
Pygame Tutorial #10 - Finishing Touches & Next Steps
Tech With Tim
How to Fade Your Screen in Pygame [CODE IN DESCRIPTION]
Tech With Tim
How to Create a Button in Pygame [CODE IN DESCRIPTION]
Tech With Tim
Pygame Side-Scroller Tutorial #1 - Scrolling Background/Character Movement
Tech With Tim
Pygame Side-Scroller Tutorial #2 - Random Object Generation
Tech With Tim
Pygame Side-Scroller Tutorial #3 - Collision
Tech With Tim
Pygame Side-Scroller Tutorial #4 - Scoring and End Screen
Tech With Tim
How to Create A Message Box in Python - Tkinter
Tech With Tim
Is Ethereum Mining Still Profitable - Is It Worth It (April 2018)
Tech With Tim
How to Run MAC OSX on a WINDOWS PC (Clover Boot-loader)
Tech With Tim
Programming Problem #1 - Alphabet Soup (Beginner/Novice)
Tech With Tim
More on: Algorithm Basics
View skill →Related Reads
📰
📰
📰
📰
O(N) Manacher's Algorithm with Mirror Boundary Optimization
Dev.to · Dipaditya Das
Building a Power Grid Inside Minecraft with BFS Algorithms
Dev.to · Carlos Cortez 🇵🇪 [AWS Hero]
The Run-Length Encoding Trick: How Simple Strings Get Compressed
Medium · Programming
75 Days of Leetcode — Day 4: #238 — Product of Array Except Self
Medium · AI
Chapters (7)
| Learn DSA Without Hating Your Life
0:24
| Picking a Good Language
1:30
| Learn the Theory Quickly
4:24
| DSA Questions
6:55
| Practice Like You Play
8:05
| Mock Interviews
9:10
| Having Confidence
🎓
Tutor Explanation
DeepCamp AI