O'Reilly logo

Design and analysis of Algorithms, 2nd Edition by Himanshu B Dave

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

8

Design Using Recursion

Objectives

After reading this chapter, you should understand:

  • The design of recursive algorithms
  • Execution trace and its use in understanding control flow of programs
  • How to express the execution trace using regular expressions
  • Iterative and recursive functions
  • The Ackermann’s function

To define recursion, we must first define recursion.

—Author unknown

To iterate is human; to recurse, divine.

—Author unknown

Chapter Outline

8.1  Introduction

We are already familiar with recursive algorithms and their implementation. It is ...

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