Week 8 - Recursion

Learning objectives

Upon finishing this week, you should be able to:

  • Trace recursive algorithms by hand
  • Write recursive algorithms to solve problems
Quiz 3 is open this Thurs-Sat. It covers weeks 6-7

Suggested pacing

Day 1

  • Recursion basics
  • Do Recursion Practice WS (See classroom files link)

Day 2

  • Recursion writing and helper functions
  • CPP Lab Recursion 1

Day 3

  • Recursion Applications & Tail Recursion
  • CPP Lab Recursion 2

Day 4

Activity Outline

Recursion Basics

Read 17.1-17.2. Watch this video:

Do the Recursion Practice WS from classroom files link. The key is there as well.

Recursion writing and helper functions

Read 17.3-17.5 and watch these two videos:

Do the Recursion 1 CPP Lab .

Applications of Recursion

Read 17.6-17.9 and watch this video (hint: the flood fill sample is very similar to the logic you need for assignment 8). Source code is in the Github repository

Start working on this week's assignment.

Do the Recursion 2 CPP Lab .