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 the Base Case in a factorial function?
Think about the definition of factorial.
Provide an example of where recursion is used.
Consider a sequence of numbers.
What is a Base Case in recursion?
Think about why functions need to stop calling themselves.
True or False: Every recursive function must have at least one Base Case.
Consider what happens if there's no stopping condition.
Design a recursive function to generate Fibonacci numbers up to a certain input n. Discuss the Base Case you used.
Think about how Fibonacci numbers are defined.
Create a recursive function that determines whether a string is a palindrome. Describe the Base Case.
Consider how you compare characters in the string.
5 more questions in this section. Enroll free to practise them all.
Enroll free