Wrapping Up

As you’ve seen, stacks and queues are programmers’ tools for elegantly handling all sorts of practical algorithms.

Now that we’ve learned about stacks and queues, we’ve unlocked a new achievement: we can learn about recursion, which depends upon a stack. Recursion also serves as the foundation for many of the more advanced and super efficient algorithms that we will cover in the rest of this book.

Get A Common-Sense Guide to Data Structures and Algorithms now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.