Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
Explain what recursion is in your own words.
Think about self-reference in solving problems.
What is the base case in a recursive function?
It prevents infinite loops.
What is the main characteristic of a recursive function?
Think about the definition of recursion.
True or False: The base case in recursion is optional.
Remember how recursion needs to stop.
Design a recursive algorithm to compute the nth Fibonacci number, and explain its time complexity.
Think about how many function calls are made for each number.
Create a recursive function to reverse a string. Explain how it works.
Consider how each character is processed back to front.
4 more questions in this section. Enroll free to practise them all.
Enroll free