Skip to Content
Grokking Algorithms, Second Edition
book

Grokking Algorithms, Second Edition

by Aditya Bhargava
March 2024
Beginner to intermediate
320 pages
7h 6m
English
Manning Publications
Content preview from Grokking Algorithms, Second Edition

3 Recursion

In this chapter

  • You learn about recursion. Recursion is a coding technique used in many algorithms. It’s a building block for understanding later chapters in this book.
  • You learn what a base case and a recursive case is. The divide-and-conquer strategy (chapter 4) uses this simple concept to solve hard problems.

I’m excited about this chapter because it covers recursion, an elegant way to solve problems. Recursion is one of my favorite topics, but it’s divisive. People either love it or hate it—or hate it until they learn to love it a few years later. I personally was in that third camp. To make things easier for you, I have some advice:

  • This chapter has a lot of code examples. Run the code for yourself to see how it works.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Grokking Algorithms

Grokking Algorithms

Aditya Bhargava
Algorithms: 24-part Lecture Series

Algorithms: 24-part Lecture Series

Robert Sedgewick, Kevin Wayne

Publisher Resources

ISBN: 9781633438538Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link