0% found this document useful (0 votes)
2 views4 pages

NoteGPT_How I Mastered Data Structures and Algorithms

Uploaded by

bittugehlot122
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

NoteGPT_How I Mastered Data Structures and Algorithms

Uploaded by

bittugehlot122
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

getting good at data structures and algorithms helped me clear interviews at

Amazon Google and Microsoft but mastering DSA was not an easy task I tried
everything from books courses both free and paid ones and spent thousands of hours
solving need code problems looking back I realized I wasted a lot of time on things
that didn't help me get better at DSA at all in this video I will sh tips that
worked for me and that can help you master DSA more efficiently without feeling
overwhelmed I will talk

about the important DSA topics for interviews resources I found useful and how
to master a DSA topic from scratch I will also share a revision strategy so that
you don't forget the problems you have already solved what are the must know DSA
topics for interviews we can group DSA topics into three pillars data structures
algorithms and problem solving techniques data structures are of two types linear
and nonlinear linear data structures include arrays link list Stacks cues has
tables and nonlinear

data structures include trees binary SE heaps graphs try and Union find you
should start with linear data structures before moving on to nonlinear ones since
they are more complex for algorithms focus on salting binary search bit
manipulation tree traversal algorithms including in order pre-order post order and
level order graph algorithms including DFS and BFS topological salt and salt as
path algorithms like Dietra and bman for and lastly for problem solving techniques
you should focus on 2. pointers sliding window prefix sum

fast and slow pointers divide and conquer greedy algorithms recursion
backtracking dynamic programming and topk elements there are other topics like
segment trees and fic trees but they are rarely asked in coding interviews it's
good to know about them but you don't need to study them deeply in the beginning
focus on the most commonly asked topics also having a good understanding of how to
measure time and space complexity of algorithms will be very helpful in your
journey to master DSA one mistake I made that wasted a lot

of my time was trying to learn many topics at once learning many topics at the
same time can become overwhelming so at the start focus on one Topic at a time it
makes learning easier and less stressful we don't need to fully Master a topic
before moving on to the next one but at least get to a point where you understand
the ins and outs of that topic how to implement it from scratch and able to solve
lead code easy problems related to that topic what's the right order to learn DSA
topics the important thing to remember is that some

topics depend on others for example if you don't understand recursion you will
struggle to solve tree related problems here is the order I recommend start with
linear data structures like arrays link places stacks skes and has tables then
learn popular algorithms and problem solving patterns like two pointers sliding
window recursion backtracking salting searching and bit manipulation next study
hierarchical data structures like trees binary sear trees try and heaps after that
learn more complex

algorithms like greedy and dynamic programming finally study graphs and Union
find data structures this is just my recommendation but you can change it based on
what you already know and what you prefer to learn how to start learning a new
topic you can follow these steps to get a head start on a new topic first start
with Basics Begin by learning what it is how it's represented in code different
operations you can perform on it and the time and space complexities for example if
you're learning B sores understand how it's

represented and learn common operations like inserting a node deleting a node
and searching for a node second learn real applications data sectes and algorithms
are not just called coding interviews they are used in real life too for example
when you use Google Maps to find the sest route to your friend's house it use graph
data structure and sort as path algorithms like Direct that's why when you are
learning it's good to understand how these concepts are used in real life this can
help you see why data structures and algorithms

are important and it might make learning them more exciting you can do a Google
search or ask AI tools like chib to learn how a particular data structure or
algorithm is used in real life next use pen and paper one of the best ways to
understand DSA topics is to visualize them using pen and paper visualizing data
structures and algorithms can help you understand and remember them better draw
simple diagrams and write pseudo code to see how the data structure or algorithm
works for example while

learning about link list draw NES and pointers to see how notes are connected
and how operations like insertion and deletions are performed next implement it
from scratch once you understand how it works code it out from scratch in your Fab
programming language implementing it yourself reinforces your understanding and
helps you grasp the underlying Mechanics for example when you are learning about
Stacks try implementing them using arrays or link list Implement methods for push
pop and Peak operations next learn init

libraries in most interviews you probably won't be asked to implement a data


structure from scratch but you will need to know how to use them to solve coding
problems most popular programming languages come been built in support for popular
data structures and algorithms for example python has list sets and dictionaries
and Java provides array list has map and preset as part of the collections Library
so learn how to use these built-in libraries and the various methods each data
structure offers and

the last solve easy problems just reading about a topic or watching tutorials
is not enough you need to practice coding problems related to the topic to build
confidence and reinforce learning this practice helps you apply the concept you
have just learned and solidifies your understanding after understanding the basics
of a topic and it implementation try solving four to five easy problems on code
related to the topic you're currently learning what are some good resources to
learn DSA there are many great resources available

online especially on YouTube here are some resources that I personally found
quite useful to build a solid foundation in DSA Abdul Bar's algorithm playlist
William F data structure and graphs playlist to S dynamic programming playlist and
these two courses on corer aard algorithms one and algorithms 2 outut these and
more DSA resources in my GitHub repository called awesome lead code resources you
can find the link in the description how to master and Esa topic after you have
learned the basics

you are ready to go deep here are few tips to understand data structures and
algorithms in depth number one prioritize solving problems over Theory while
understanding the theory is important in the beginning the real learning happens
when you apply that knowledge to solve problems the more problems you solve the
better you will understand data structures and algorithms so don't spend all your
time watching tutorials once you understand a concept you start solving problems
related to it on lead code if you want

to learn about how to start lead code and use it effectively you can watch this
video next challenge yourself getting good at DSA is like getting stronger at the
gym lifting the same bits every day won't make you stronger you need to slowly lift
heavier weights to we muscles similarly to improve a DSA you should gradually go
beyond your comfort zone and Tackle harder problems for example if you can
comfortably solve most easy problems move on to medium problems number three
understand don't memorize when learning DSA focus on

understanding the underlying Concepts and principles instead of just memorizing


code or Solutions memorizing may help you solve specific problems but it limits
your ability to apply your knowledge to new scenarios it's okay if you need to look
at the solution for a difficult problem but try to understand why the solution
works and then implement it by yourself if you're having trouble understanding the
answer try drawing it out with a pen and a paper usually for challenging problem
there is a specific trick or coding

pattern knowing which makes the solution easier so for every hard problem ask
yourself what is that one thing knowing which made everything else easier next
think in patterns one of the fastest ways to get better at DSA is to think in terms
of patterns knowing these patterns can help you quickly identify the right approach
to solve new problems and enable you to solve a large number of problems in lesser
time as you solve more problems notice the techniques and approaches that come up
often group

similar problems together and find the common strategies used some of the
common problem solving patterns are two pointers used to solve problems involving
arrays or link list especially where you need to find pairs or triplets that
satisfy certain conditions sliding window used for problems involving Ser arays or
server strings particularly when you need to find the maximum minimum or a specific
condition within a fix size window fast and slow pointers use for problems related
to finding Cycles in link list or arrays Marg

intervals use for problems involving patterns such as merging overlapping


intervals and backtracking which is used for problems involving permutations
combinations and other scenarios where you need to explore all possible
configurations you can find more patterns in this GitHub repository called awesome
lead code resources if you want me to make detailed videos on these patterns let me
know in the comments and make sure to subscribe so that you don't miss my new
videos how to retain what you have learned mastering

DSA requires not only learning new Concepts and solving problems but also
retaining that knowledge over time how the problems that I couldn't solve in one go
and I had to look at the solution I realized that I soon forgot how to solve those
problems after a few weeks here are some tips to help you remember what you have
learned number one repetition when we learn something new it goes into our solter
memory but when we repeat it many times it moves to a long-term memory therefore
repetition is important to transfer Knowledge from

short-term to long-term memory by revising Concepts and problems regularly you


reinforce your understanding and make it easier to recall the information later so
regularly visit problems you found challenging and try to solve them again without
looking at Solutions here is an effective approach I followed for the problems I
couldn't solve in the first attempt on lead code you can create list make tool is
revision one and revision two if you can't solve a problem on your first attempt
and need to look at the solution put it in the

revision one list after a few weeks try to solve problems in the revision one
list if you can solve them on your own move them to the revision two list if not
leave it on the revision one list a few weeks later try to solve the problems in
the revision two list if you can solve it by yourself well done youve got it remove
it from the list and next bookmark everything important having quick access to high
quality resources saves time and helps you revisit important Concepts and solutions
so use browser bookmarks or tools like Google
Drive notion to save links to useful articles tutorial and problem solving
guide you can also tag and organize bookmarks by category for easy access you can
find my most important resources in the giup repository I mentioned earlier and
finally be consistent learning DSA takes time and the only way to improve is to
keep working at it some topics might take weeks or months to Masters so be patient
with yourself and it's normal to feel stuck or frustrated when solving a
challenging problem or trying to understand a complex topic

just keep going if a problem seems too hard take a break and then try again set
a goal based on how much time you want to de to your preparation and practice
regularly even if it's just one or two problems every day if you enjoyed this video
you will also like my newsletter where I write articles on important topics related
to coding DSA and system design you can subscribe it at blog. algom master.

You might also like