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 the Fibonacci number at position 5?
Count the sequence starting from 0.
Define what a base case is in recursion.
Think about what prevents infinite loops.
What is the first number in the Fibonacci series?
Recall how the series starts.
Recursive functions can lead to infinite loops.
Think about what stops a function from calling itself forever.
How would you adapt the Fibonacci function to return both the Fibonacci number and the number of recursive calls made?
Think about altering return values.
Can you devise a way to visualize the recursive call tree for Fibonacci(5)?
Map it out just like a family tree!
6 more questions in this section. Enroll free to practise them all.
Enroll free