Unit 10: Recursion

Unit 10: Recursion

Sometimes a problem can be solved by solving smaller or simpler versions of the same problem rather than attempting an iterative solution. This is called recursion, and it is a powerful math and computer science idea. In this unit, students will revisit how control is passed when methods are called, which is necessary knowledge when working with recursion. Tracing skills introduced in Unit 2 are helpful for determining the purpose or output of a recursive method. In this unit, students will learn how to write simple recursive methods and determine the purpose or output of a recursive method by tracing.


ESSENTIAL QUESTIONS

Control [CON]

What real-world processes do you follow that are recursive in nature?

Why do programmers sometimes prefer using recursive solutions when sorting data in a large data set?


BIG IDEAS

+ Executing recursive methods

+ Searching and sorting using binary search and merge sort algorithms


UNIT TOPICS & ACTIVITIES

10.1: Recursion

10.2: Recursive Searching and Sorting


Link to Brainscapes

SKILLS ADDRESSED


Program Design and Algorithm Development

1.B: Determine code that would be used to complete code segments.

Code Logic

2.C: Determine the result or output based on the statement execution order in a code segment containing method calls.

2.D: Determine the number of times a code segment will execute.

Documentation

5.A: Describe the behavior of a given segment of program code