CS 101 Lecture 16 - Recursive Structures and Methods II

Class Examples:

  1. Here is an applet that recursively computes the factorial and the Fibonacci sequence.

    Click on Fibonacci to show the example.

  2. Cut-the-knot's Towers of Hanoi applet. Here is a wider version of this applet so that all the controls are visible on Mac browsers.

  3. This text-only version demonstrates the simple recursive solution.

    Click on Towers of Hanoi solution to show the example.

  4. Let's make last lecture's target movable, even though it has a variable number of rectangles.

    Click on MovableTarget to show the example.