Here is the algorithm to learn data structures and algorithms. 🙂 You can learn them in any language of your choice.
- List all the DS and Algo you want to learn. Pick one. Say: XYZ.
- 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).
- Repeat the search on YouTube (use 1.5 or 2x speed for videos if required).
- Refine the search terms and/or web resources to search in and continue reading & listening until you totally get that XYZ and its uses.
- 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?
- Yes → Goto step 5.
- No → Goto step 3.
- Pick the next item in your list. Goto step 2.
This is the list I recommend you begin with.