The best books on algorithms

3 authors have picked their favorite books about algorithms and why they recommend each book.

Soon, you will be able to filter by genre, age group, and more. Sign up here to follow our story as we build a better way to explore books.

Shepherd is reader supported. When you buy through links on our website, we may earn an affiliate commission (learn more).

The Golden Ticket

By Lance Fortnow,

Book cover of The Golden Ticket: P, NP, and the Search for the Impossible

The most important unanswered question in computer science has a huge public relations problem. Back in the 1970s, this question became known as “P=NP?”—and who could write an exciting book about that? Luckily for us, Lance Fortnow can. As one of the world’s foremost experts on P-vs-NP, he takes us on a wild and truly accessible ride through the most important question about computing. I’ve seen many attempts at making “P=NP?” accessible/understandable/intriguing for non-experts. But Fortnow nails it like nobody else, reformulating P-vs-NP as a search for one of the golden tickets in Charlie and the Chocolate Factory. (Which is another one of my favorite books, even though it’s not going to make it onto this list about algorithms.)


Who am I?

Once upon a time, I was a computer science researcher, working in the research labs of companies like Microsoft and Hewlett-Packard. Later I started teaching computer science to college students and writing books about algorithms. I love computers and I love algorithms. Most of all, I love explaining algorithms to other people. In fact, one of my most important missions in life is to advance the public understanding of computer science and algorithms. So if you read any of the books on my list, you’ll bring me one step closer to achieving my mission. Go ahead, read one now!


I wrote...

Nine Algorithms That Changed the Future: The Ingenious Ideas That Drive Today's Computers

By John MacCormick,

Book cover of Nine Algorithms That Changed the Future: The Ingenious Ideas That Drive Today's Computers

What is my book about?

Nine revolutionary algorithms that power our computers and smartphones, described using vivid examples in language that anyone can understand.

Introduction to Algorithms

By Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein

Book cover of Introduction to Algorithms

With over one million copies sold this may be the most popular computer science book in the world. This bedrock of computer science education is both a definitive textbook and reference book and is a must-have for anyone in the field of computer science. This latest edition is significantly updated and includes color throughout the text.


Who am I?

Dr. Jeremy Kepner is head and founder of the MIT Lincoln Laboratory Supercomputing Center (LLSC), and also a Founder of the MIT-Air Force AI Accelerator. Lincoln Laboratory is a 4000-person National Laboratory whose mission is to create defensive technologies to protect our Nation and the freedoms enshrined in the Constitution of the United States. Dr. Kepner is one of five Lincoln Laboratory Fellows, a position that "recognizes the Laboratory's strongest technical talent for outstanding contributions to Laboratory programs over many years." Dr. Kepner is recognized as one of nine MIT Fellows of the Society of Industrial Applied Mathematics (SIAM), for "contributions to interactive parallel computing, matrix-based graph algorithms, green supercomputing, and big data." 


I wrote...

Mathematics of Big Data: Spreadsheets, Databases, Matrices, and Graphs

By Jeremy Kepner, Hayden Jananthan,

Book cover of Mathematics of Big Data: Spreadsheets, Databases, Matrices, and Graphs

What is my book about?

Today, the volume, velocity, and variety of data are increasing rapidly across a range of fields, including Internet search, healthcare, finance, social media, wireless devices, and cybersecurity. Indeed, these data are growing at a rate beyond our capacity to analyze them. The tools—including spreadsheets, databases, matrices, and graphs—developed to address this challenge all reflect the need to store and operate on data as whole sets rather than as individual elements. This book presents the common mathematical foundations of these data sets that apply across many applications and technologies. Associative arrays unify and simplify data, allowing readers to look past the differences among the various tools and leverage their mathematical similarities in order to solve the hardest big data challenges.

Algorithms Illuminated (Part 1)

By Tim Roughgarden,

Book cover of Algorithms Illuminated (Part 1): The Basics

How do we know whether an algorithm is correct? While intuition is helpful, for tricky algorithms nothing beats the formal proof. But I don’t want a proof for proof’s sake: I want it to deepen my understanding of the algorithm. The proofs in this book series are the best I’ve seen: they are self-contained, described step by step, and serve to sharpen your understanding of what the algorithm is really doing. Couple that fact with the self-check questions, exercises with solutions, and associated video lectures, and what we have here is a wonderful resource for the motivated algorithms learner.


Who am I?

I love pulling back the curtain on how computers work. I want to go from thinking "that's magic" to "that's unbelievably clever but now I understand how it works." Each time I am able to do this feels like a hard-won but therefore meaningful step toward understanding. I want others to experience this empowering shift. I have a PhD in computer science education, and  I want to know what helps people learn. More importantly, I want to know how we can use such discoveries to write more effective books. The books I appreciate most are those that demonstrate not only mastery of the subject matter but also mastery of teaching.


I wrote...

Algorithmic Thinking: A Problem-Based Introduction

By Daniel Zingaro,

Book cover of Algorithmic Thinking: A Problem-Based Introduction

What is my book about?

Knowing how to design algorithms will take you from being a good programmer to being a great programmer. Algorithmic Thinking will teach you how to design your own rocket-fast, correct algorithms. Not interested in wading through proofs and math? Not interested in pseudocode that you can’t run? Not interested in seeing the same examples that you’ve seen in all of the other books? Good—there’s none of that here. You’ll rigorously learn all of the heavyweights that you need to know: hash tables, recursion, dynamic programming, trees, graphs, heaps, union-find, and more. You’ll learn it all in the context of solving programming puzzles. You’ll learn it all from someone who has dedicated their career to helping students learn. It is time for you to finally and truly learn this stuff.

Algorithms

By Robert Sedgewick, Kevin Wayne,

Book cover of Algorithms

Many of my favourite algorithms books give short shrift to designing APIs for the algorithms and data structures that they present. The Sedgewick and Wayne book, by contrast, goes all in on an object-oriented API design. This is my book choice for Java programmers and those interested in larger program design considerations. Clear your calendar: each chapter here is massive, but I think the time investment is worth it. I especially like the chapter that shows how to tune classic algorithms for realizing speedups when working with strings.


Who am I?

I love pulling back the curtain on how computers work. I want to go from thinking "that's magic" to "that's unbelievably clever but now I understand how it works." Each time I am able to do this feels like a hard-won but therefore meaningful step toward understanding. I want others to experience this empowering shift. I have a PhD in computer science education, and  I want to know what helps people learn. More importantly, I want to know how we can use such discoveries to write more effective books. The books I appreciate most are those that demonstrate not only mastery of the subject matter but also mastery of teaching.


I wrote...

Algorithmic Thinking: A Problem-Based Introduction

By Daniel Zingaro,

Book cover of Algorithmic Thinking: A Problem-Based Introduction

What is my book about?

Knowing how to design algorithms will take you from being a good programmer to being a great programmer. Algorithmic Thinking will teach you how to design your own rocket-fast, correct algorithms. Not interested in wading through proofs and math? Not interested in pseudocode that you can’t run? Not interested in seeing the same examples that you’ve seen in all of the other books? Good—there’s none of that here. You’ll rigorously learn all of the heavyweights that you need to know: hash tables, recursion, dynamic programming, trees, graphs, heaps, union-find, and more. You’ll learn it all in the context of solving programming puzzles. You’ll learn it all from someone who has dedicated their career to helping students learn. It is time for you to finally and truly learn this stuff.

A Common-Sense Guide to Data Structures and Algorithms

By Jay Wengrow,

Book cover of A Common-Sense Guide to Data Structures and Algorithms: Level Up Your Core Programming Skills

For an overview book that focuses on intuition—a book that is intentionally designed to evade formality—to make my list, it has to be really, really good. This one is. I appreciate the inclusion of real code in multiple programming languages and the step-by-step traces of algorithms. I appreciate the care taken with the Big O material and the way that abstract data types are introduced. This is one of very few books whose recursion material I like—the ‘napkin’ approach to recursion is wonderfully done.  


Who am I?

I love pulling back the curtain on how computers work. I want to go from thinking "that's magic" to "that's unbelievably clever but now I understand how it works." Each time I am able to do this feels like a hard-won but therefore meaningful step toward understanding. I want others to experience this empowering shift. I have a PhD in computer science education, and  I want to know what helps people learn. More importantly, I want to know how we can use such discoveries to write more effective books. The books I appreciate most are those that demonstrate not only mastery of the subject matter but also mastery of teaching.


I wrote...

Algorithmic Thinking: A Problem-Based Introduction

By Daniel Zingaro,

Book cover of Algorithmic Thinking: A Problem-Based Introduction

What is my book about?

Knowing how to design algorithms will take you from being a good programmer to being a great programmer. Algorithmic Thinking will teach you how to design your own rocket-fast, correct algorithms. Not interested in wading through proofs and math? Not interested in pseudocode that you can’t run? Not interested in seeing the same examples that you’ve seen in all of the other books? Good—there’s none of that here. You’ll rigorously learn all of the heavyweights that you need to know: hash tables, recursion, dynamic programming, trees, graphs, heaps, union-find, and more. You’ll learn it all in the context of solving programming puzzles. You’ll learn it all from someone who has dedicated their career to helping students learn. It is time for you to finally and truly learn this stuff.

The Art of Computer Programming

By Donald Knuth,

Book cover of The Art of Computer Programming: Volume 3: Sorting and Searching

Knuth’s unique mix of playfulness and rigor came to define computer science as an intellectual discipline: computer science didn’t really have anything to do with computers, but everything to do with a particular way of seeing the world.  Just browse and wonder at the beauty and precision achieved in these books.   

Volume 3 (Sorting and Searching) is my personal favorite, and I encourage you to start there. During the pandemic, I finally got around to reading Volume 4A (Combinatorial Algorithms), which was published thirty plus years after Volume 3. It was the same feeling I had watching the movie The Phantom Menace years after growing up with the original Star Wars trilogy. I had forgotten just how unique and distinctive Knuth’s Art of Computer Programming is.


Who am I?

I am Professor of Computer Science at Stony Brook University, and have spent the past thirty years thinking/teaching/writing about algorithms. Algorithms are the really cool thing about computer science, for they form the ideas behind any interesting computer program. And algorithms turn out to be the ideas behind many interesting aspects of life that have nothing to do with computers. I have written six books on algorithms, programming, gambling, and history –including the ranking of the historical significance of all the people in Wikipedia.


I wrote...

The Algorithm Design Manual

By Steven S. Skiena,

Book cover of The Algorithm Design Manual

What is my book about?

This newly expanded and updated third edition of the bestselling classic continues to take the "mystery" out of designing algorithms and analyzing their efficacy and efficiency. It serves as the primary text of choice for algorithm design courses while maintaining its status as the premier practical reference guide to algorithms for programmers, researchers, and students.

The reader-friendly The Algorithm Design Manual provides straightforward access to combinatorial algorithms technology, stressing design over-analysis. The first part, "Techniques", provides accessible instruction on methods for designing and analyzing computer algorithms. The second part, "Resources", is intended for browsing and reference, and comprises the catalog of algorithmic resources, implementations, and an extensive bibliography.

Algorithm Design

By Jon Kleinberg, Éva Tardos,

Book cover of Algorithm Design

I’ve probably spent more time with this book than with any other technical book. It’s one of those books where you can get as much out of it as you like by revisiting the material at increasing levels of depth. I appreciate the conversational but rigorous tone, the solved examples, the false starts, the intuition that the authors build, and the applications of algorithm design to realistic problems. The Maximum Flow chapter is not to be missed.


Who am I?

I love pulling back the curtain on how computers work. I want to go from thinking "that's magic" to "that's unbelievably clever but now I understand how it works." Each time I am able to do this feels like a hard-won but therefore meaningful step toward understanding. I want others to experience this empowering shift. I have a PhD in computer science education, and  I want to know what helps people learn. More importantly, I want to know how we can use such discoveries to write more effective books. The books I appreciate most are those that demonstrate not only mastery of the subject matter but also mastery of teaching.


I wrote...

Algorithmic Thinking: A Problem-Based Introduction

By Daniel Zingaro,

Book cover of Algorithmic Thinking: A Problem-Based Introduction

What is my book about?

Knowing how to design algorithms will take you from being a good programmer to being a great programmer. Algorithmic Thinking will teach you how to design your own rocket-fast, correct algorithms. Not interested in wading through proofs and math? Not interested in pseudocode that you can’t run? Not interested in seeing the same examples that you’ve seen in all of the other books? Good—there’s none of that here. You’ll rigorously learn all of the heavyweights that you need to know: hash tables, recursion, dynamic programming, trees, graphs, heaps, union-find, and more. You’ll learn it all in the context of solving programming puzzles. You’ll learn it all from someone who has dedicated their career to helping students learn. It is time for you to finally and truly learn this stuff.

Data Structures and Algorithms

By Alfred Aho, Jeffrey Ullman, John Hopcroft

Book cover of Data Structures and Algorithms

This is the book that started it all for me… and I think it holds up just fine today. I see value in confronting the old Pascal code every so often: it’s a reminder of how little we need in order to make our algorithms fast, and how much is happening behind the scenes by our modern programming languages. To this day this book has some of my favourite presentations of Dijkstra’s Algorithm and sorting.


Who am I?

I love pulling back the curtain on how computers work. I want to go from thinking "that's magic" to "that's unbelievably clever but now I understand how it works." Each time I am able to do this feels like a hard-won but therefore meaningful step toward understanding. I want others to experience this empowering shift. I have a PhD in computer science education, and  I want to know what helps people learn. More importantly, I want to know how we can use such discoveries to write more effective books. The books I appreciate most are those that demonstrate not only mastery of the subject matter but also mastery of teaching.


I wrote...

Algorithmic Thinking: A Problem-Based Introduction

By Daniel Zingaro,

Book cover of Algorithmic Thinking: A Problem-Based Introduction

What is my book about?

Knowing how to design algorithms will take you from being a good programmer to being a great programmer. Algorithmic Thinking will teach you how to design your own rocket-fast, correct algorithms. Not interested in wading through proofs and math? Not interested in pseudocode that you can’t run? Not interested in seeing the same examples that you’ve seen in all of the other books? Good—there’s none of that here. You’ll rigorously learn all of the heavyweights that you need to know: hash tables, recursion, dynamic programming, trees, graphs, heaps, union-find, and more. You’ll learn it all in the context of solving programming puzzles. You’ll learn it all from someone who has dedicated their career to helping students learn. It is time for you to finally and truly learn this stuff.

Hello World

By Hannah Fry,

Book cover of Hello World: Being Human in the Age of Algorithms

This is a clever and highly readable guide to the brave new world of algorithms: what they are, how they work, and their strengths and weaknesses. It’s packed with stories and vivid examples, but Dr Fry is a serious mathematician and when it comes to the crunch she is well able to show it with clear and rigorous analysis.


Who am I?

Tim Harford is the author of nine books, including The Undercover Economist and The Data Detective, and the host of the Cautionary Tales podcast. He presents the BBC Radio programs More or Less, Fifty Things That Made The Modern Economy, and How To Vaccinate The World. Tim is a senior columnist for the Financial Times, a member of Nuffield College, Oxford, and the only journalist to have been made an honorary fellow of the Royal Statistical Society.


I wrote...

The Data Detective: Ten Easy Rules to Make Sense of Statistics

By Tim Harford,

Book cover of The Data Detective: Ten Easy Rules to Make Sense of Statistics

What is my book about?

Today we think statistics are the enemy, numbers used to mislead and confuse us. That's a mistake, Tim Harford says in The Data Detective. We shouldn't be suspicious of statistics--we need to understand what they mean and how they can improve our lives: they are, at heart, human behavior seen through the prism of numbers and are often "the only way of grasping much of what is going on around us." If we can toss aside our fears and learn to approach them clearly--understanding how our own preconceptions lead us astray--statistics can point to ways we can live better and work smarter.

Book Funnels & Amazon Ads

By Alex Strathdee, Gabi Youssef, Josh Navarro

Book cover of Book Funnels & Amazon Ads: Use Your Book & Amazon Ads To Attract Customers and Build a 6+ Figure Business

In Book Funnels & Amazon Ads, Alex draws from his experience of working with hundreds of authors. He delves into Amazon Advertising and reveals how to leverage this unique opportunity to your advantage. Amazon ads can be very effective for authors but you need to educate yourself before diving in. There is too much to know to just ‘wing it.’ This book was written by a person who is first a techie guy and understands Amazon algorithms like you and I will never comprehend.

Follow Alex’s advice and use Amazon ads.


Who am I?

I am a book publicist and President of Westwind Book Marketing, a public relations and marketing firm that has a special knack for working with authors to help them get all the publicity they deserve and more. I work with bestselling authors and self-published authors promoting all types of books, whether it's their first book or their 15th book. I’ve handled publicity for books by CEOs, CIA Officers, Navy SEALS, Homemakers, Fitness Gurus, Doctors, Lawyers, and Adventurers. My clients have been featured by Good Morning America, FOX & Friends, CNN, ABC News, New York Times, Nightline, TIME, PBS, LA Times, USA Today, Washington Post, Woman's World, and Howard Stern. 


I wrote...

Book Title Generator: A Proven System in Naming Your Book

By Scott Lorenz,

Book cover of Book Title Generator: A Proven System in Naming Your Book

What is my book about?

As a Book Publicist I have helped title hundreds of books and promoted hundreds more. I am a student of book titles and share my nearly three decades of book marketing experience with authors in this book.

 

I ask authors to consider all options in the quest for the perfect book title. From using numbers, alliteration, idioms, and keyword research, Book Title Generator covers them all.

Or, view all 18 books about algorithms

New book lists related to algorithms

All book lists related to algorithms

Bookshelves related to algorithms