Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
 
 

README.md

Outline

Recursion

A recursive function is one that calls itself to solve a problem. Rather than tackling a big problem all at once with little steps (like a for loop), recursion breaks the problem into smaller versions of the same problem, solves the smallest part, and combines the results. This strategy of breaking down and building back up is a key strategy in computer science.

Learning Objectives

  • 🥚 The Callstack: You can inspect, explain, and predict a program's callstack using the debugger.
  • 🥚 Stack Overflow: You can inspect and explain stack overflow errors.
  • 🥚 Parts of a Recursive Solution: You can explain how the 5 parts of a recursion solution work together:
    • Base Case
    • Turn-Around
    • Break-Down
    • Recursion
    • Build-Up
  • 🥚 Labeling Recursive Solutions: You can use comments to identify and label the 5 parts of a recursive solution written in Python.
  • 🥚 (semi)Formal Definition: You can write a (semi)formal recursive definition to describe a recursive solution written in Python.
  • 🐣 Visualizing Implementation: You can use the debugger and print statements to visualize a recursive solution's implementation.
  • 🐣 Visualizing Strategy: You can visualize a recursive solution's strategy using the tool(s) of your choice:
  • 🐣 Debugging Recursion: You can use the 5 parts of recursion to help find and fix bugs in a recursive solution.
  • 🐥Writing Recursion: You can plan a recursive solution using the 5 parts as a guide, then can implement your strategy as a Python function.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.