O'Reilly logo

Introduction to Recursive Programming by Manuel Rubio-Sanchez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 4

Linear Recursion I: Basic Algorithms

Do the difficult things while they are easy and do the great things while they are small. A journey of a thousand miles must begin with a single step.

—Lao Tzu

RECURSIVE methods can be categorized according to the number of times they invoke themselves in the recursive cases. This chapter examines methods that not only call themselves just once, but also process the output of the recursive call before producing or returning their own result. This common type of recursion is known as linear recursionRecursive!type!linear, where the single recursive call is not the last operation carried out by the method. This chapter will present numerous problems and respective linear-recursive solutions that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required