Published in


How To Master Data Structures and Algorithms

What are Data Structures and algorithms

Data Structures as the name suggests are structures used for storage and organizing data. In other words data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data.

An Algorithm is a finite sequence of well-defined steps i.e it is a collection of well-defined instructions written in human-understandable form, typically to solve a problem or to perform a computation.

It’s all about efficiency….

Yes all these data structures and different algorithms are used to fulfill just one aim which is efficiency in terms of time and space, in today’s
world space is even not a big enough problem but time is a precious resource and one of the most crucial thing to decide the success of any project any venture in the computer science world and that’s why efficient use of data structure and efficient algorithms are a very much required
and it can only be achieved only if you have a strong foundation in DS and algo and that’s why it is called the bread and butter of computer science.


Now, here comes the big question: how to learn DSA?

Learning data structures and algorithm is not a static process that include just cramming all the basic concepts and you are got to go. No, it is a dynamic process that includes constant learning, you can never learn everything about data structures and algorithms and it should be your basic attitude to keep learning and keep asking yourself — can we do better.

You can start with learning basic topics like array, linked-list, stack, queue, tree, graphs. You can learn basic algorithms like searching, sorting, Euclid gcd method etc. After learning these topics you should start practicing problems on each topic as only then you will be able to understand the need, benefits and implementation of a particular data structure or algorithm. For practice there are various sources remember the questions which are covered in the university syllabus or covered in the classroom do no good in improving your skills.

You can practice on geeksforgeeks or leetcode but these are placement specific websites and if you got time you should try to master the concepts instead of solving just questions specific to placement tests. I would advise you to start with competitive programming websites like CodeChef , codeforces, SPOJ, Hackerrank there are editorials available for maximum problems which contains in-depth explanation and solution of the problem here you can learn and solve those problems which you can’t solve during the contest here real learning happens you will learn new techniques and topics.

Just practice practice and practice, yes it is the only way after learning basic topics you should just focus on practicing problems, if you get stuck somewhere read the editorial, if you find some new data structure or a new algorithm just read it online and then try to solve the question.

Following the above stated path you will learn all the necessary topics eventually and this may take time but perseverance is the key.

Resources To Follow

To study the concepts and other theory parts I personally recommend you to follow free resources as there are plenty and at the end it is dependent on you and how many efforts you yourself put.

For free resources you can follow:

  • MyCodeSchool — it is also a good YouTube channel having a good playlist but here you can’t find much diversity but it is really good to learn basics.
  • HackerEarth Codemonk- It is also a great resource having written tutorials source code and problems.
  • CodeChef DSA — Codechef conducts an exam on DSA and there in the prepare section you can find a large number of resources topic wise and topics are categorized in three levels.

For Paid resource:

  • You can follow Algorithms Specialisation from Stanford University taught by Tim Roughgarden on Coursera it may feel a little bit difficult to understand and theoretical in the beginning but if you can withstand the beginning part it would prove to be a great learning experience.
  • You can join a classroom course from any reputed institution near you or you can join online courses from institution like Coding blocks/Ninjas etc.


  • Introduction to Algorithms by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein.
  • Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
  • Data Structures And Algorithms Made Easy: Data Structure And Algorithmic Puzzles by Narasimha Karumanchi.
  • Data Structures Using C by Reema Thareja.


Originally published at on April 3, 2020.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aman Kumar Goyal

Aman Kumar Goyal


Competitive Programmer | Web developer | Coding Blocks CA | Editor at RootTech . Connect : @amanearthian.