How I Mastered Data Structures and Algorithms - Ashish Pratap Singh
How I Mastered Data Structures and Algorithms - Ashish Pratap Singh
565 20 Share
Getting good at Data Structures and Algorithms (DSA) helped me clear interviews at
Amazon, Google and Microsoft.
I tried everything from books, courses (both free and paid ones), and spent thousands
of hours solving LeetCode problems.
Looking back, I realized I spent a lot of time on things that didn't really help me get
better at DSA. Had I focused on the right things, my journey would have been a lot
easier.
https://blog.algomaster.io/p/how-i-mastered-data-structures-and-algorithms 1/11
04/10/2024, 09:07 How I Mastered Data Structures and Algorithms
In this article, I'll share tips that will help you master DSA more efficiently without
feeling overwhelmed.
I'll discuss the key topics to focus on and the right order to learn them, how to start
learning a new topic, resources you can use and how to scale your DSA knowledge.
I'll also share an effective revision strategy so that you don’t forget the problems
you've already solved.
The three main pillars of DSA are Data Structures, Algorithms, and Problem-
Solving Techniques.
There are other topics like Segment Trees, Fenwick Trees but they are rarely asked in
coding interviews.
https://blog.algomaster.io/p/how-i-mastered-data-structures-and-algorithms 2/11
04/10/2024, 09:07 How I Mastered Data Structures and Algorithms
Focusing on one topic at a time makes the learning process more manageable and
less stressful.
You should start with easy topics first and gradually move to difficult topics.
Begin with linear data structures like arrays, linked lists, stack, queues before
moving on to more complex ones like trees, heaps or graphs.
Example: For binary search trees, understand how it’s represented and learn
common operations like inserting a node, deleting a node, and searching for
https://blog.algomaster.io/p/how-i-mastered-data-structures-and-algorithms 3/11
04/10/2024, 09:07 How I Mastered Data Structures and Algorithms
a node.
Example: Graphs are used in routing algorithms to find the shortest path
between nodes in a network, such as in GPS navigation systems.
Use Pen and Paper: Visualizing concepts on pen and paper helps in better
understanding and retention. Draw diagrams, flowcharts, and write pseudocode
to visualize how the data structure or algorithm works.
Example: For linked lists, draw nodes and pointers to see how nodes are
connected and how operations like insertion and deletion are performed.
Example: Implement a stack using arrays or linked lists. Write functions for
push, pop, and peek operations.
Learn the Inbuilt Library Functions: Learn how to use standard libraries in
your programming language that provide data structures and algorithms.
Example: In Python, learn how to use lists, sets, and dictionaries. In Java,
get familiar with ArrayList, HashMap, and TreeSet.
Solve Simple Problems: Just reading about a topic or watching tutorials is not
enough. Practice simple problems related to the topic to build confidence and
reinforce learning.
Solve 4-5 easy problems on LeetCode from the topic you are currently
learning.
4. Resources
There are many great resources available online.
https://blog.algomaster.io/p/how-i-mastered-data-structures-and-algorithms 4/11
04/10/2024, 09:07 How I Mastered Data Structures and Algorithms
Here are some that I personally found quite useful to build a solid foundation in
DSA:
Coursera - Algorithms 1
Coursera - Algorithms 2
The more problems you solve, the more you'll reinforce your understanding of data
structures and algorithms.
Challenge yourself
Getting good at DSA is similar to building muscles in the gym.
https://blog.algomaster.io/p/how-i-mastered-data-structures-and-algorithms 5/11
04/10/2024, 09:07 How I Mastered Data Structures and Algorithms
Lifting the same weights everyday won't make you stronger. You need to slowly lift
heavier weights to build muscle.
Likewise, to get better at DSA, you should slowly tackle harder problems.
Example: If you can comfortably solve most easy problems, move to medium
problems.
Memorization may help you solve specific problems, but it limits your ability to
adapt and apply your knowledge to new scenarios.
Think in Patterns
Many problems share underlying patterns. Recognizing these patterns can help you
quickly identify the right approach to solve new problems, reducing the time spent
on trial and error.
As you solve more problems, take note of recurring techniques and approaches.
Group similar problems together and identify the common strategies used.
https://blog.algomaster.io/p/how-i-mastered-data-structures-and-algorithms 6/11
04/10/2024, 09:07 How I Mastered Data Structures and Algorithms
Repetition is key
Repetition is key to transferring knowledge from short-term to long-term memory.
https://blog.algomaster.io/p/how-i-mastered-data-structures-and-algorithms 7/11
04/10/2024, 09:07 How I Mastered Data Structures and Algorithms
By revisiting concepts and problems regularly, you reinforce your understanding and
make it easier to recall the information later.
Regularly revisit problems you found challenging and try to solve them again without
looking at solutions.
I found this to be an effective approach for the problems I couldn’t solve in the first
attempt.
Use browser bookmarks or tools like Google Drive, Notion to save links to useful
articles, tutorials, and problem-solving guides. Tag and organize bookmarks by
category for easy access.
https://blog.algomaster.io/p/how-i-mastered-data-structures-and-algorithms 8/11
04/10/2024, 09:07 How I Mastered Data Structures and Algorithms
7. Be Consistent
Learning DSA takes time.
Some topics might take weeks or months to master. 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.
Keep going.
If you need help, check hints or use the LeetCode discussion forum.
If you found it valuable, hit a like ❤️ and consider subscribing for more such content
every week.
https://blog.algomaster.io/p/how-i-mastered-data-structures-and-algorithms 9/11
04/10/2024, 09:07 How I Mastered Data Structures and Algorithms
Ashish
Previous Next
Comments Restacks
Write a comment...
Manoj kumar Manoj Kumar Sah Jun 16 Liked by Ashish Pratap Singh
1. Array
3. Sorting
4. Searching
5. LinkedIn list
6. Recursion
8. Bit manipulation
9. Tree
10.Graph
12. Backtracking
https://blog.algomaster.io/p/how-i-mastered-data-structures-and-algorithms 10/11
04/10/2024, 09:07 How I Mastered Data Structures and Algorithms
Then additional
- consistency
Thank you!
Now I Known how to master DSA. Continue sharing, you help a lot.
LIKE (2) REPLY SHARE
18 more comments...
https://blog.algomaster.io/p/how-i-mastered-data-structures-and-algorithms 11/11