CHAPTER 15

Recursion

 

Objectives

  • To explain what a recursive function is and describe the benefits of using recursion (§15.1).
  • To develop a recursive program for computing factorial (§15.2).
  • To develop a recursive program for computing Fibonacci numbers (§15.3).
  • To solve problems using recursion (§15.4).
  • To use a helper function to design a recursive function (§15.5).
  • To implement a selection sort using recursion (§15.5.1).
  • To implement a binary search using recursion (§15.5.2).
  • To get a directory’s size using recursion (§15.6).
  • To solve the Tower of Hanoi problem using recursion (§15.7).
  • To draw fractals using recursion (§15.8).
  • To solve the Eight Queens problem using recursion (§15.9).
  • To explain the relationship and differences between ...

Get Introduction to Python Programming and Data Structures, 3rd Edition by Pearson 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.