Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is recursion?
Think about how a function can repeat itself.
Give an example of a recursive method.
Consider calculations that break down larger problems.
What is a base case in recursion?
Think about what conditions stop a recursive method.
True or False: Every recursive method must have both a base case and a recursive case.
Consider the necessity of conditions in recursion.
Create a recursive method that reverses a string.
Consider how to break down the string into smaller parts.
Write a recursive method to find the nth power of a number without using loops or Math.pow.
Think about the properties of exponents.
5 more questions in this section. Enroll free to practise them all.
Enroll free