The Design and Analysis of Algorithms
This is the book that I used in my algorithms class at university ( 2000-2005 - “5 year plan” ). This book covers all of the major algorithms in great detail. It also covers the theory behind these algorithms. I personally enjoyed the approach taken with this book and would definitly recommend it.
You probably don’t need to read this entire book, cover to cover, just to be a good developer and pass leet code style tests but it doesn’t hurt. You are pretty much guaranteed to come out better after completing it. Most people are probably just going to use it as a reference though which is fine I guess.
If you are at university and if already are taking an algorithms class you probably want to just stick with whatever book your professor is making you use. These days though college text books are crazy expensive and come with all sorts of wonky things like online codes that need to be redeemed in order to be able to take exams and other terrible things like this. Back when I was at university we just got regular books. The were expensive but not as expensive as they are now and you at least got what you paid for ( no online activation stuff ). I remember it being possible to buy used books and to even use a slightly different version of a book. Some classes would be totally fine without buying the book at all. I kind of like to just have the books just even if it was just for the sake of having them.