AP CS 11: Recursion

Premium Lesson

This is a premium course. To view and assign premium course, you must upgrade your account

Upgrade Now

Recusion is when a method calls itself repeatedly in order to solve a task. Recursive methods need to be written with an end point in mind, called a base case.

Course Items

Introduction to Recursion

A recursive method is a method that calls itself. These can be tricky to write but can also make life easier sometimes.

Backtracking Recursive Methods

Backtracking is a technique you can use to work out what a recursive algorithm does

Backtracking Exercise

Use backtracking to reverse engineer what this method does

Multi-Input Recursion

It's worth pointing out that recursive methods can take multiple parameters too

Avoiding Infinite Recursion

Make sure your recursive methods have a proper base case that is guaranteed to be reached eventually.

The Fibonacci Sequence

The Fibonacci Sequence is a famous sequence of adding numbers together that appears in many instances in nature.

Euclid's Greatest Common Denominator Algorithm

The great ancient Greek mathematician, Euclid's algorithm for computing the greatest common denominator between two numbers.

Binary Search

A fast method of searching through sorted lists

AP CS 11: Recursion Info


AP Computer Science





Created By


AP CS 11: Recursion Prereqs