How I Mastered Data Structures and Algorithms

Tech With Tim · Beginner ·⚡ Algorithms & Data Structures ·12mo ago

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 A* Path Finding Algorithm(Visualization)
A* Path Finding Algorithm(Visualization)
Tech With Tim
2 Python Programming Tutorial #1 - Variables and Data Types
Python Programming Tutorial #1 - Variables and Data Types
Tech With Tim
3 Python Programming Tutorial #2 - Basic Operators and Input
Python Programming Tutorial #2 - Basic Operators and Input
Tech With Tim
4 Python Programming Tutorial #3 - Conditions
Python Programming Tutorial #3 - Conditions
Tech With Tim
5 Python Programming Tutorial #4 - IF/ELIF/ELSE
Python Programming Tutorial #4 - IF/ELIF/ELSE
Tech With Tim
6 Python Programming Tutorial #5 - Chained Conditionals and Nested Statements
Python Programming Tutorial #5 - Chained Conditionals and Nested Statements
Tech With Tim
7 Python Programming Tutorial #6 - For Loops
Python Programming Tutorial #6 - For Loops
Tech With Tim
8 Python Programming Tutorial #7 - While Loops
Python Programming Tutorial #7 - While Loops
Tech With Tim
9 Python Programming Tutorial #8 - Lists and Tuples
Python Programming Tutorial #8 - Lists and Tuples
Tech With Tim
10 Python Programming Tutorial #9 - Iteration by Item (For Loops Continued...)
Python Programming Tutorial #9 - Iteration by Item (For Loops Continued...)
Tech With Tim
11 Python Programming Tutorial #10 - String Methods
Python Programming Tutorial #10 - String Methods
Tech With Tim
12 How to Overclock a NVIDIA GPU
How to Overclock a NVIDIA GPU
Tech With Tim
13 Python Programming Tutorial #11 - Slice Operator
Python Programming Tutorial #11 - Slice Operator
Tech With Tim
14 Python Programming Tutorial #12 - Functions
Python Programming Tutorial #12 - Functions
Tech With Tim
15 Python Programming Tutorial #13 - How to Read a Text File
Python Programming Tutorial #13 - How to Read a Text File
Tech With Tim
16 Python Programming Tutorial #14 - Writing to a Text File
Python Programming Tutorial #14 - Writing to a Text File
Tech With Tim
17 Python Programming Tutorial #15 - Using .count() and .find()
Python Programming Tutorial #15 - Using .count() and .find()
Tech With Tim
18 Python Programming Tutorial #16 - Introduction to Modular Programming
Python Programming Tutorial #16 - Introduction to Modular Programming
Tech With Tim
19 Python Programming Tutorial #17 - Optional Parameters
Python Programming Tutorial #17 - Optional Parameters
Tech With Tim
20 Python Programming Tutorial #18 - Try and Except (Python Error Handling)
Python Programming Tutorial #18 - Try and Except (Python Error Handling)
Tech With Tim
21 Python Programming Tutorial #19 - Global vs Local Variables
Python Programming Tutorial #19 - Global vs Local Variables
Tech With Tim
22 Python Programming Tutorial #20 - Classes and Objects
Python Programming Tutorial #20 - Classes and Objects
Tech With Tim
23 Cool VBS Script to Prank Your Friends!
Cool VBS Script to Prank Your Friends!
Tech With Tim
24 How to Overclock an AMD GPU
How to Overclock an AMD GPU
Tech With Tim
25 Best GPU'S For Mining Ethereum (2018)
Best GPU'S For Mining Ethereum (2018)
Tech With Tim
26 Recursion and Memoization Tutorial Python
Recursion and Memoization Tutorial Python
Tech With Tim
27 Ethereum Mining Rig - Hardware Guide
Ethereum Mining Rig - Hardware Guide
Tech With Tim
28 Pygame Tutorial #1 - Basic Movement and Key Presses
Pygame Tutorial #1 - Basic Movement and Key Presses
Tech With Tim
29 How to Install Pygame (Windows 8/10)
How to Install Pygame (Windows 8/10)
Tech With Tim
30 How to Trade Your Cryptocurrency (Bitcoin, Ethereum etc.) For Cash!
How to Trade Your Cryptocurrency (Bitcoin, Ethereum etc.) For Cash!
Tech With Tim
31 How to Mine Ethereum 2018 - WORKING (Super-Easy)
How to Mine Ethereum 2018 - WORKING (Super-Easy)
Tech With Tim
32 Microphone Comparison - $10 Mic vs $150 Mic (Blue Yeti USB)
Microphone Comparison - $10 Mic vs $150 Mic (Blue Yeti USB)
Tech With Tim
33 Pygame Tutorial #2 - Jumping and Boundaries
Pygame Tutorial #2 - Jumping and Boundaries
Tech With Tim
34 Pygame Tutorial #3 - Character Animation & Sprites
Pygame Tutorial #3 - Character Animation & Sprites
Tech With Tim
35 Pygame Tutorial #4 - Optimization & OOP
Pygame Tutorial #4 - Optimization & OOP
Tech With Tim
36 OBS Studio Tutorial - Best OBS Settings
OBS Studio Tutorial - Best OBS Settings
Tech With Tim
37 Linear Search Algorithm - Python Example and Code
Linear Search Algorithm - Python Example and Code
Tech With Tim
38 Make Any Mic Sound AMAZING! (WITH OBS)
Make Any Mic Sound AMAZING! (WITH OBS)
Tech With Tim
39 Binary Search Algorithm - Python Example & Code
Binary Search Algorithm - Python Example & Code
Tech With Tim
40 Pygame Tutorial #5 - Projectiles
Pygame Tutorial #5 - Projectiles
Tech With Tim
41 Pygame Game - Mini Golf
Pygame Game - Mini Golf
Tech With Tim
42 Pygame Tutorial - Projectile Motion (Part 1)
Pygame Tutorial - Projectile Motion (Part 1)
Tech With Tim
43 Pygame Tutorial - Projectile Motion (Part 2)
Pygame Tutorial - Projectile Motion (Part 2)
Tech With Tim
44 Pygame Tutorial #6 - Enemies
Pygame Tutorial #6 - Enemies
Tech With Tim
45 Pygame Tutorial #7 - Collision and Hit Boxes
Pygame Tutorial #7 - Collision and Hit Boxes
Tech With Tim
46 Pygame Tutorial #8 - Scoring and Health Bars
Pygame Tutorial #8 - Scoring and Health Bars
Tech With Tim
47 Cloud Mining vs. Hardware Mining - 2018
Cloud Mining vs. Hardware Mining - 2018
Tech With Tim
48 How to Install Pygame on Mac OSX (Fast-Simple)
How to Install Pygame on Mac OSX (Fast-Simple)
Tech With Tim
49 Pygame Tutorial #9 - Sound Effects, Music & More Collision
Pygame Tutorial #9 - Sound Effects, Music & More Collision
Tech With Tim
50 Pygame Tutorial #10 - Finishing Touches & Next Steps
Pygame Tutorial #10 - Finishing Touches & Next Steps
Tech With Tim
51 How to Fade Your Screen in Pygame [CODE IN DESCRIPTION]
How to Fade Your Screen in Pygame [CODE IN DESCRIPTION]
Tech With Tim
52 How to Create a Button in Pygame [CODE IN DESCRIPTION]
How to Create a Button in Pygame [CODE IN DESCRIPTION]
Tech With Tim
53 Pygame Side-Scroller Tutorial #1 - Scrolling Background/Character Movement
Pygame Side-Scroller Tutorial #1 - Scrolling Background/Character Movement
Tech With Tim
54 Pygame Side-Scroller Tutorial #2 - Random Object Generation
Pygame Side-Scroller Tutorial #2 - Random Object Generation
Tech With Tim
55 Pygame Side-Scroller Tutorial #3 - Collision
Pygame Side-Scroller Tutorial #3 - Collision
Tech With Tim
56 Pygame Side-Scroller Tutorial #4 - Scoring and End Screen
Pygame Side-Scroller Tutorial #4 - Scoring and End Screen
Tech With Tim
57 How to Create A Message Box in Python - Tkinter
How to Create A Message Box in Python - Tkinter
Tech With Tim
58 Is Ethereum Mining Still Profitable - Is It Worth It (April 2018)
Is Ethereum Mining Still Profitable - Is It Worth It (April 2018)
Tech With Tim
59 How to Run MAC OSX on a WINDOWS PC (Clover Boot-loader)
How to Run MAC OSX on a WINDOWS PC (Clover Boot-loader)
Tech With Tim
60 Programming Problem #1 - Alphabet Soup (Beginner/Novice)
Programming Problem #1 - Alphabet Soup (Beginner/Novice)
Tech With Tim

This video teaches how to efficiently master data structures and algorithms, making it less painful and more enjoyable. Tech With Tim shares his approach to learning DSA quickly and building confidence through practice and mock interviews. By following these steps, viewers can improve their coding skills and advance their careers.

Key Takeaways
  1. Choose a good programming language
  2. Learn the theory of data structures and algorithms quickly
  3. Practice with DSA questions
  4. Practice like you play
  5. Participate in mock interviews
  6. Build confidence in your coding skills
💡 Mastering data structures and algorithms doesn't have to be painful. With the right approach, practice, and mindset, it can be efficient and enjoyable.

Related Reads

📰
O(N) Manacher's Algorithm with Mirror Boundary Optimization
Learn to optimize palindrome detection using Manacher's Algorithm with mirror boundary optimization, reducing time complexity to O(N)
Dev.to · Dipaditya Das
📰
Building a Power Grid Inside Minecraft with BFS Algorithms
Learn to build a power grid inside Minecraft using BFS algorithms and understand its relevance to cloud services
Dev.to · Carlos Cortez 🇵🇪 [AWS Hero]
📰
The Run-Length Encoding Trick: How Simple Strings Get Compressed
Learn how Run-Length Encoding (RLE) compresses simple strings, a fundamental technique in programming and data compression, and apply it to optimize storage and transmission of data
Medium · Programming
📰
75 Days of Leetcode — Day 4: #238 — Product of Array Except Self
Solve the Product of Array Except Self problem on LeetCode to improve coding skills and learn array manipulation techniques
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
Up next
Stump Grinder Carbide Wheel Grinds Hardwood To Chips
Innoforge Studio
Watch →