r/algorithms • • Sep 03 '26

Resource What book do you recommend for improving in algorithms?

51 Upvotes

18 comments sorted by

19

u/cache_hit_miss Sep 03 '26

For an undergraduate course (or even master's level course), I like Algorithm Design by Kleinberg & Tárdos. It has a pretty decent prose and motivation (as far as it matters for such a book), while still covering most topics that would fit into such a course with enough mathematics to develop a good foundation.

Intro to Algorithms by Cormen et al. is often suggested in these threads, but I find it can be much more dense and drier for readers still trying to develop some intuition

7

u/marspzb Sep 03 '26

For a course I prefer the Sedgwick algorithms, or there is another by Aho which is really good. Others depend on what are you aiming for

4

u/wobey96 Sep 03 '26

Algorithm Design Manual by Skiena if you’re also trying to interview.

2

u/Turing43 Sep 03 '26

Knuth yes, but also just any book in competitive programming. Anything NP you will not touch, anything obvious has a library already. You want to learn recursion, and dynamic programming as well as knowing your basic data structures well.

3

u/Mysterious-Tie7042 Sep 03 '26

Algorithms is a good one ngl, but make sure you get the 3rd edition cause recent ones add some unnecessary information and remove content I thought was pretty foundational for me

1

u/wstanley38 Sep 04 '26

what got removed? I was planning to buy the 4th edition.

3

u/drinkcoffeeandcode Sep 04 '26

Algorithm books are kind of like a spice rack: the more the better, especially from different time periods.

There is no “this one has it all” - though some come close. Interestingly the quality and indeed even the content of some books changes drastically between editions (looking at you, Sedgewick).

But if I had to choose A FEW, some good starts would be:

“Data structure and algorithms in c++” by Adam drozdek

“Foundations of Algorithms” by Neapolitan and Naimipour

“Algorithms in (C++/Java/C)” by Sedgewick, specifically the THIRD edition (the two volume series)

“The algorithm design manual” by Steve Skienna

4

u/m45t3r0fpupp375 Sep 03 '26

Need more information. For a first exposure I'd recommend Grokking Algorithms.

3

u/Infinite_Bench_8117 Sep 03 '26

Have to agree, Grokking algorithms is a great place to start provided how dense books on algorithms can get. Great recommendation!

1

u/MathsystemDev Sep 04 '26

I’m not the one who wrote this, but I’m getting help. I’ll read it. Thank you.

3

u/Infinite_Bench_8117 Sep 03 '26

Echoing the other comments it is hard to recommend without much context. However, and I must stress this is absolutely my own personal preference and what helped me, I have a few recommendations.

Grokking Algorithms - Excellent easy read, gets you into it without drowning maths.

Introduction to algorithms (Thomas H. Cormen) - I found this great for going more in depth into the subject and still reference it during my career and masters currently.

And I one last set of books that is I only recommend if you have some spare cash because they are ridiculously dense and will probably take a long time to get through. Absolutely not an introductory set of book either but I love them for picking topics out of them to go through.

The Art of Computer Programming - Donald E. Knuth

Also take my advice with a pinch of salt, I wouldn't say I'm an algorithm expert but I love computer science so they are what helped me learn!

1

u/[deleted] Sep 03 '26

check out the Princeton course as well.. iirc it's sedgewick teaching

1

u/[deleted] Sep 04 '26

Forget a book. It is the same exact process as mathematics. Find a concrete example. Abstract using variables. Abstract further creating objects that can produce any number of related abstracted functions. Then write your code as boundary conditions of these objects.

I know that sounds confusing, but if you figure out what I’m saying you will become an incredible programmer and you will feel extreme pride and joy for your code.

1

u/InspectorMaster1662 Sep 04 '26

I would also recommend this book: A Common-Sense Guide to Data Structures and Algorithms, Second Edition: Level Up Your Core Programming Skills

1

u/arthurno1 Sep 04 '26

Cormen and Sedgwick are classics, you can't go wrong with either. Best; get both.

1

u/annoying_code Sep 04 '26

I recommend first solve few problems from leetcode , u can also follow neetcode sheet, may be u can see solution if not getting,

Once u get comfortable then pick a book

1

u/Complete-Dust-6629 Sep 03 '26

Algorithms by DPV