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 recursion?
Think about when the recursion should terminate.
What does the recursive case do?
Consider how the function operates on modified arguments.
What must every recursive function include?
Think about the structure of recursive functions.
True or False: Recursion always consumes less memory than iteration.
What happens when you have a deep recursion?
Write a recursive function to merge two sorted arrays into one sorted array.
Consider how you would compare the first elements of both arrays.
Explain how recursion applies to solving the Towers of Hanoi problem.
Break down the problem based on the first disk movement to help visualize the solution.
5 more questions in this section. Enroll free to practise them all.
Enroll free