How do I learn data structures and algorithms on my own?

Here is the algorithm to learn data structures and algorithms. 🙂 You can learn them in any language of your choice.

  1. List all the DS and Algo you want to learn. Pick one. Say: XYZ.
  2. Search the Internet for: “What is XYZ”, “Applications of XYZ”, “Pros and cons of XYZ”, etc. Follow the first three links and see how much they make sense (don’t bother if the link is from Wikipedia, popular school, blog, corporation, whatever. Google is good enough to rank the articles for you).
    1. Repeat the search on YouTube (use 1.5 or 2x speed for videos if required).
  3. Refine the search terms and/or web resources to search in and continue reading & listening until you totally get that XYZ and its uses.
  4. IF you are preparing for interviews, go to geeksforgeeks (or any ‘hot’ and relevant website) and search for problems specific to XYZ. Are you able to solve a few (5–10) random problems without looking at their answers?
    1. Yes → Goto step 5.
    2. No → Goto step 3.
  5. Pick the next item in your list. Goto step 2.

This is the list I recommend you begin with.