Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is recursion?
Think about self-referential functions.
What is the base case in recursion?
It's essential to prevent infinite loops.
What does a recursive function require to prevent infinite loops?
Think about what stops the function from running forever.
True or False: Indirect recursion is when a function calls itself directly.
Refer to how functions can relate to each other.
Write a recursive function to generate the first n terms of the Fibonacci sequence.
Think about how the Fibonacci function is defined.
Design a recursive function to reverse a string.
Consider how you can take the last character and reverse the remaining string.
5 more questions in this section. Enroll free to practise them all.
Enroll free