Suggestions for learning algorithms

I have done a couple of contests in codechef and I have found tat my main handicap is algorithms. Please suggest a book to learn about algorithms related to optimization, dp and data structures like trees and graphs

3 Likes

Thanks a lot

Also, once you learn about a certain algorithm, I recommend finding a problem to solve that requires it. For example, if you want to learn Dijkstra’s algorithm, first read about how it works, then try problems like these:

Tutorials usually give you exhaustive explanations for an all-inclusive setting, but I find it helpful to just gather what I can from there and immediately apply it to a much simpler actual problem. It then becomes much easier to expand to more generic situations, once you have a handle on the basic concept. Make the algorithm your own. Also, editorials are your friends. :slight_smile:

2 Likes

:smiley: welcome

Thanks a lot. Really helpful suggestion

Hello @danieljeswin,
You can visit this link. It has most probably all the algorithms and data structures along with tutorials and problems in them.

[Data Structures and Algorithms][1]

Happy Coding :slight_smile:
[1]: https://discuss.codechef.com/questions/48877/data-structures-and-algorithms

1 Like

There are several great books for learning - two that are commonly cited are Algorithms 4th Edition by Sedgewick, and Introduction to Algorithms 3rd Edition (CLRS). Personally, I found the latter easier to follow and better explained but I know people who feel the opposite.

P.S. if you liked my response please upvote - since I am a new member I need karma points to do basically anything on this site :slight_smile:

1 Like

You can study and practice different Data Structures and Algorithms here

I found it really helpful

2 Likes

The best way to learn is practice. Whenever you learn some topic you can practice it over here …
https://a2oj.com/categories
This website has many problems topic-wise and arranged on the basis of difficulty…

6 Likes

Thanks for the suggestions

Thanks a lot :slight_smile:

Really helpful :slight_smile:

1 Like