[00:00]
Today I'm going to explain to you how I
[00:01]
mastered data structures and algorithms
[00:03]
quickly without hating my life. Now I
[00:06]
say that because a lot of people that
[00:07]
get into this topic do it completely
[00:10]
wrong. It takes up a massive amount of
[00:12]
time and they just hate doing it. It's
[00:14]
brutal. And let's not lie, no one enjoys
[00:16]
data structures and algorithms. But
[00:17]
there's a way to do it that's a lot less
[00:19]
painful that I want to break down in
[00:21]
this video. Okay, so let's get right
[00:23]
into it. First things first, do yourself
[00:25]
a favor and pick an easy language to do
[00:27]
this in. Now, most people are going to
[00:29]
be learning this either because they're
[00:31]
in a computer science degree or because
[00:33]
they're preparing for technical coding
[00:34]
interviews. Now, I'm mostly speaking to
[00:36]
that latter group there, people that are
[00:38]
doing this because eventually they're
[00:39]
going to be quizzed on this type of
[00:41]
stuff and have to answer these le code
[00:42]
style problems. So, I highly recommend
[00:45]
use a language like Python when you're
[00:47]
learning this and when you're going to
[00:49]
be practicing these DSA style problems.
[00:51]
The reason for that is it's a much more
[00:53]
elegant language. It's way easier to
[00:55]
write code in it and it's much easier to
[00:57]
follow. So if you had to answer a
[00:59]
question in Java, for example, it's
[01:00]
going to take you just longer to write
[01:02]
the code due to the syntax style of
[01:04]
Java. Doesn't mean Java is a bad
[01:06]
language, but for the purpose of passing
[01:08]
coding interviews, you're just doing
[01:10]
yourself a favor if you pick a language
[01:11]
like Python. Okay? Even if you don't use
[01:13]
it or it's not your primary language,
[01:15]
it's very easy to learn enough of it to
[01:17]
be able to answer coding questions in
[01:19]
it. So I recommend that you pick
[01:21]
something like Python, maybe even
[01:22]
something like JavaScript. Anything that
[01:24]
has relatively simple syntax and dynamic
[01:27]
typing is going to help you a lot. Okay,
[01:29]
moving on. Step number two. Now, I
[01:31]
learned the theory quickly. A lot of
[01:34]
people spend months learning the theory
[01:35]
of data structures and algorithms.
[01:37]
That's not necessary. There's three main
[01:39]
things that you need to learn or kind of
[01:40]
three main topics. I'll quickly go over
[01:42]
them, but the point is don't spend too
[01:44]
much time here. You need to understand
[01:45]
the algorithms and data structures. Know
[01:47]
the time complexity of the operations,
[01:49]
but that's about it. You don't need to
[01:50]
implement these from scratch. Sure, if
[01:52]
you have extra time, it's a good idea,
[01:54]
but it's not necessary. You're not going
[01:55]
to be asked to write a heap, or at least
[01:57]
very unlikely that they'd ask you to do
[01:59]
that. It's more so understanding how to
[02:00]
use the data structures and what the
[02:02]
time complexity of the operations are.
[02:04]
So, what I did is I started by learning
[02:06]
bigo notation and time complexity
[02:08]
analysis. This is the most fundamental
[02:10]
thing. You need to understand this. Then
[02:12]
I started looking at data structures. So
[02:14]
I won't go through an entire exhaustive
[02:16]
list because there's a lot of resources
[02:17]
online that cover those better than this
[02:19]
video can. But things like stack, Q
[02:21]
linked list, trees, etc. I skipped the
[02:24]
super complex stuff. So things like B
[02:26]
trees, for example, red black trees, AVL
[02:28]
trees, tries, if you're going for more
[02:31]
senior positions, maybe you need to know
[02:32]
those, but in my case, for internship or
[02:34]
kind of entry level roles, you're just
[02:36]
probably not going to be quizzed on
[02:38]
those. Then I started looking at
[02:39]
algorithms. So obviously famous
[02:41]
algorithms, your sorting algorithms,
[02:43]
your searching algorithms and I didn't
[02:45]
implement all of these on my own. I just
[02:47]
understood what they were enough that if
[02:49]
I were asked a question about them, I
[02:50]
would know the time complexity or I
[02:52]
would know that they exist. I looked at
[02:54]
things like graph algorithms and then I
[02:56]
started looking at some more niche
[02:58]
algorithms that come up in coding
[02:59]
problems a lot. So things like dynamic
[03:02]
programming, greedy algorithms, things
[03:04]
like the two-pointer approach, the
[03:06]
sliding window, and again not memorizing
[03:09]
these, but just knowing that they exist
[03:11]
and having some basic theory
[03:12]
understanding so that when I start
[03:14]
getting into solving problems, I know
[03:16]
enough that I can at least reference
[03:18]
back to that topic and then learn it
[03:20]
more by applying it directly. Now, in
[03:22]
terms of how I learned these, I pretty
[03:23]
much just searched for a bunch of
[03:25]
resources online. I found a solid road
[03:27]
map that walked through a bunch of those
[03:28]
topics and then I followed it and I
[03:30]
looked up YouTube videos and used
[03:32]
websites like Geeks for Geeks. Now,
[03:33]
quick pause here because you'll probably
[03:35]
find this relevant. If you are a
[03:36]
software engineer right now or you are
[03:38]
looking to become a software engineer
[03:40]
and something like technical interview
[03:41]
prep is holding you back, then consider
[03:43]
applying for my program at Dev Launch.
[03:45]
In this program, we take on a very small
[03:47]
group of developers. Yes, it is
[03:49]
expensive. It's a high ticket program,
[03:51]
but it's designed to give people
[03:52]
one-on-one guidance to help them land
[03:54]
their next role. And we've already had a
[03:56]
lot of success. For example, we had a
[03:58]
senior software engineer come in really
[03:59]
struggling with this topic specifically.
[04:02]
We gave him the correct guidance, helped
[04:03]
him with all the mock technical
[04:04]
interviews, and he just landed 180K per
[04:07]
year role and is interviewing with Meta
[04:09]
right now where we expect him to receive
[04:10]
an offer because he's in the final
[04:12]
rounds. We have a lot of other examples
[04:14]
like that. But if you're serious about
[04:15]
this and you want someone to hold your
[04:17]
hand through this whole process, then
[04:18]
you can apply from Dev Launch down
[04:20]
below. We don't just do technical
[04:22]
interview prep, but obviously that's
[04:23]
relevant to this video. Okay,
[04:24]
continuing. Let's get into my prep when
[04:27]
it came to the questions. So, I saw so
[04:29]
many articles online of people saying
[04:31]
they did like 400 lead code questions or
[04:33]
300 lead code questions or even 200.
[04:36]
That is insane to do that many
[04:37]
questions. First of all, that will take
[04:39]
you like four, five, six months unless
[04:41]
you're doing five a day or something
[04:42]
along those lines. And I want to tell
[04:43]
you for myself, I only did 60 lead code
[04:47]
questions and I did about 50 algo expert
[04:50]
questions. Okay? So my process when I
[04:52]
was practicing these questions first of
[04:54]
all was to always emphasize quality over
[04:57]
quantity. Now yes you do need to put in
[04:59]
sufficient volume. I think getting to
[05:01]
about 75 to 100 questions for most
[05:03]
people should be enough if they're
[05:05]
practicing correctly and picking the
[05:06]
right questions. But for me I started
[05:08]
with a platform like Algo Expert. Now
[05:10]
this is before I worked for Algo Expert
[05:12]
in case you guys think this is like a
[05:13]
sponsor. I don't actually make any money
[05:15]
if you buy that uh platform so I don't
[05:17]
care if you use it. But for me, I liked
[05:19]
that platform because it had really
[05:21]
in-depth video explanations of all of
[05:24]
the questions. Now, I think Lead Code
[05:25]
may have those now as well. It's been a
[05:27]
while since I did this. But for me, when
[05:29]
I was starting out, I really struggled
[05:31]
with these questions. Like, I could
[05:32]
hardly answer some of the easy
[05:33]
questions. So what I would do is I would
[05:35]
struggle at a question, but when I
[05:36]
wasn't getting anywhere at all and I had
[05:38]
put in the time and I had struggled, I
[05:40]
would go and I would watch through the
[05:41]
video explanation and really make sure
[05:43]
that I understood it and then reattempt
[05:45]
the question right after to see if I
[05:47]
could actually do it on my own. So
[05:49]
that's how I started getting good really
[05:50]
fast was failing essentially watching
[05:53]
the solution and then not just moving on
[05:55]
to the next question, but doing it again
[05:57]
after watching the solution. And then I
[05:59]
might even revisit it another time,
[06:00]
maybe the next day to make sure that I
[06:02]
actually comprehended it. So even though
[06:04]
I only did maybe 50 questions, I would
[06:06]
do the same question multiple times
[06:08]
until I actually got it correct. Okay,
[06:10]
so that was where I started with Algo
[06:12]
Expert, right? But they only have maybe
[06:14]
150, 200 questions on the platform and
[06:16]
by the time you get through 50 or 60,
[06:18]
you've done a lot of the easy medium
[06:20]
ones, which is what I was targeting for
[06:22]
kind of the internship level roles. So
[06:24]
after that, I switched over to leak
[06:26]
code. Now, leak code is a lot more
[06:28]
challenging in my opinion because you
[06:29]
don't have the same level of guidance or
[06:31]
the same kind of quality of video
[06:32]
explanations, but it's good when you
[06:34]
want to put in more volume. So, then I
[06:36]
switched over to leak code and again,
[06:38]
same thing. I would do the questions. I
[06:40]
would try to check the answers, but it
[06:42]
wasn't always as good as Algo Expert.
[06:43]
And that's when I put in more volume.
[06:45]
Now, I was typically doing about two
[06:46]
questions per day when I was preparing.
[06:49]
And again, I was making sure that when I
[06:51]
did these questions, I was emphasizing
[06:52]
quality, which I'm going to move on to
[06:54]
next. Okay. So, while I was doing these
[06:56]
questions and especially in those last
[06:58]
leak code questions, I made sure that I
[07:01]
was practicing like I play, which I
[07:03]
think is the number one mistake that
[07:04]
people make when they do these types of
[07:06]
problems. You can do as many problems as
[07:08]
you want, but if you don't emulate a
[07:10]
real coding interview, you're not going
[07:12]
to succeed when you're just thrown into
[07:13]
that environment. Now, I did a lot of
[07:15]
research online. I knew people in the
[07:17]
space, so I knew I'm probably going to
[07:18]
have to write this out by hand. I'm
[07:20]
going to have to verbalize my solution,
[07:22]
and I'm going to have to walk through
[07:23]
this very strict framework that I
[07:25]
actually made a video about, which I'll
[07:26]
put on screen right now. So, what I did
[07:28]
is when I answered these questions, I
[07:30]
literally bought a whiteboard, put it in
[07:32]
my room, set up my camera, and recorded
[07:34]
myself pretending I was in an interview
[07:36]
environment. So, I would solve the
[07:38]
question actually on the whiteboard. I
[07:40]
would speak the entire time. I would
[07:42]
time myself. And while I couldn't do as
[07:44]
many questions when I did this, I really
[07:46]
got comfortable in this environment
[07:48]
where when I actually went into the real
[07:49]
interview, it was the exact same thing
[07:51]
that I've been practicing countless
[07:52]
times. So, in my room alone like a crazy
[07:55]
person, I would do that and I would
[07:56]
highly recommend you do that because
[07:58]
it's going to expose to you really
[07:59]
quickly the other parts of the coding
[08:01]
interview that most people end up
[08:03]
failing, right? That are related to the
[08:04]
communication. All right. Now, after I
[08:06]
did a bunch of reps sitting in my room
[08:07]
like a crazy person answering questions,
[08:09]
I decided I should do some real mock
[08:11]
interviews. So what I did is I reached
[08:13]
out to people that I knew. For example,
[08:15]
Clement, you guys might know him from
[08:16]
Algo Expert. We did a mock interview on
[08:18]
YouTube actually with him and I did a
[08:20]
bunch of interviews using a platform
[08:22]
called Prampt. Now I'm not sure if that
[08:24]
platform is still around. This was a
[08:25]
while ago, but essentially you could go
[08:27]
on and you can volunteer and you ask
[08:29]
someone a question and then they ask you
[08:30]
a question and you're kind of both, you
[08:32]
know, acting as the interviewer and the
[08:33]
candidate. So I did a bunch of those. I
[08:35]
probably did 15 mock interviews just to
[08:37]
make sure again I was really really
[08:39]
comfortable and I was not just worrying
[08:41]
about memorizing all of these algorithms
[08:42]
but actually how I presented them and
[08:44]
how I spoke through the problem which is
[08:46]
where I see most people failing. So just
[08:48]
make sure you do as many interviews as
[08:50]
you can. I even had some of my friends
[08:51]
who are non-technical ask me a question
[08:53]
that I had prepared for them to ask me
[08:55]
that I didn't know the answer to and
[08:56]
then I ran through it and I kind of got
[08:58]
their opinion as a non-technical person
[09:00]
on how well they thought I did. Okay, so
[09:02]
those are the main things I did to
[09:03]
prepare. The last point that I want to
[09:05]
put on here, which is the reason I
[09:06]
believe I succeeded in all of the
[09:08]
interviews that I did, because I didn't
[09:09]
fail any of them, is that I had
[09:11]
confidence when I walked into the
[09:13]
interview. Now, the reason I was
[09:15]
confident was because I knew no matter
[09:17]
what happened, I had done as much as I
[09:19]
possibly could to prepare. I put in the
[09:21]
time. I studied correctly. I did this
[09:24]
properly, right? I was putting in
[09:25]
quality. I wasn't just kind of wasting
[09:26]
my practice. And I knew that even if I
[09:29]
failed this interview, there's nothing
[09:30]
more that I could have done. I prepared
[09:32]
as best as I could. If you have that in
[09:35]
the back of your mind and you know no
[09:36]
matter what happens, it's honestly not
[09:38]
your fault. You've done the preparation,
[09:40]
you've done what you can and the result
[09:42]
will be what it will be, then I think
[09:44]
you just have some underlying confidence
[09:45]
and kind of the way you present
[09:47]
yourself, the calmness you have wears
[09:49]
off in the interview. And at least for
[09:50]
me, that's what I felt happened. And I
[09:52]
knew doesn't matter if I fail, whatever.
[09:54]
It's all good. I move on to the next one
[09:55]
because I prepared as much as I can and
[09:57]
there's just nothing more I can do. So,
[09:59]
I challenge you, get to that point
[10:01]
before you walk into some of your
[10:03]
interviews and just know in the back of
[10:04]
your mind, you've done everything you
[10:06]
can. And if if you fail, you fail. Is
[10:08]
what it is. You move on to the next one,
[10:09]
right? There's nothing to be worried
[10:10]
about. You did everything that was
[10:12]
possible. Okay, that's all I have for
[10:14]
this video. Again, if you guys want
[10:16]
assistance with this, this is exactly
[10:17]
what I do in Dev Launch. I literally
[10:19]
teamed up with someone who's an ex
[10:20]
Google, ex Amazon employee who's given
[10:22]
hundreds of these technical interviews,
[10:24]
who's really nailing the process for our
[10:26]
students in this program. If you want
[10:27]
help, apply from the link below and I
[10:29]
will see you guys in another video.
[10:31]
[Music]