Wrapping Up

As you’ve seen in the filesystem example, recursion is often a great choice for an algorithm in which the algorithm itself doesn’t know on the outset how many levels deep into something it needs to dig.

Now that you understand recursion, you’ve also unlocked a superpower. You’re about to encounter some really efficient—yet advanced—algorithms, and many of them rely on the principles of recursion.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset