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

Misconception: Students believe that boolean values can only be used in conditionals.
Write code in class in real time. This way you’ll be forced to pace yourself, so students can better see and understand the process you’re going through.
Have students develop a Java program that plots pictures in a 2D grid to practice 2D array processing with a focus on nested loops.
  • CSTT Facebook
  • CSTT Twitter

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

Privacy Policy

  • National Science Foundation
  • Sage Fox Group
  • Harvey Mudd College