Skip to content

Instantly share code, notes, and snippets.

@DrPsyFi
Forked from rogerwschmidt/recursion.md
Last active March 7, 2018 17:33
Show Gist options
  • Save DrPsyFi/bd7352f9e1d9b663ee0e04dd89f13bb0 to your computer and use it in GitHub Desktop.
Save DrPsyFi/bd7352f9e1d9b663ee0e04dd89f13bb0 to your computer and use it in GitHub Desktop.

Recursion Instructor Notes

Objectives

  • Describe what recursion is
  • Enumarate the two parts of a recursive function
  • Convert from iteration to recursive

What is recursion?

  • With your table, create a definition of what recursion is.

What are the two parts of a recursive function?

  • With your table, name the two parts of a recursive function.

Convert the following problems to recursive.

  • Add the total length of all string in an array
  • Keep all the strings up to a certain length from an array
  • Find the longest string in an array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment