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.
What is the value of 0! and why?
Consider how factorial is defined.
Write the base case for the factorial function.
Think about what needs to stop recursion.
What is the factorial of 3?
Think about the definition of factorial.
True or False: The factorial of a number n is always greater than n.
Consider specific values of factorial.
Write a recursive function to find the highest power of 2 that is less than or equal to a given number n.
Consider reducing the problem until you reach a simple case.
Create a program that calculates the sum of a list of numbers recursively.
Think about how to reduce the list at each step.
4 more questions in this section. Enroll free to practise them all.
Enroll free