Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • 3D
  • About
  • Rate Tips
  • Tip Sheets

Explain recursion with the example of determining your row in a stadium by asking the row in front of your what row it is… asking until you get to the first row, the base case.

Share Explain recursion with the example of determining your row in a stadium by asking the row in front of your what row it is… asking until you get to the first row, the base case. with FacebookShare Explain recursion with the example of determining your row in a stadium by asking the row in front of your what row it is… asking until you get to the first row, the base case. with Twitter
  • In this example the Base Case is the first row, they know what row they are 1.
  • The recursive call involves asking the row in front of you what row their in and adding 1 to that number.
  • Here's an explanation:

More about this tip

Tags

  • CS 1
  • Intro Programming
  • Programming Concepts
  • Meaningful and Relevant Content
External Source

TwoTuring (Youtube)

Other Tips By
Other Tips By TwoTuring

Similar tips

Use Potato Head Toys to teach classes, objects, methods, and properties so that students develop hands on experience with abstract topics.
Misconception: students struggle with scopes of variables and may not understand when a variable can be accessed and when it cannot be accessed.
Misconception: students forget about language-specific or paradigm-specific material (e.g., new/delete or types) when they switch between languages that don’t use the same concepts.

For more information or to report a bug, contact us at admin@csteachingtips.org. Built with Bootstrap. Powered by Drupal.

Privacy Policy