Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
24.2.2. Fibonacci Numbers
This section
Practice test
11 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
3 cards from this lesson. Good the night before a test.
Try these first
- 1.
Define Fibonacci numbers in your own words.
Hint
Think about the starting numbers.
- 2.
What is Fibonacci(3)?
Hint
Calculate using previous Fibonacci numbers.
- 3.
What are the first two Fibonacci numbers?
- 0
- 1
- 1
- 1
- 0
- 0
Hint
Remember the starting values.
- 4.
True or False: Fibonacci(5) equals Fibonacci(4) plus Fibonacci(3).
- True
- False
Hint
Think about the definition.
- 5.
Using memoization, implement a function to calculate Fibonacci numbers and compare its performance against a naive recursive implementation.
Hint
Time each approach and compare.
- 6.
Design a dynamic programming solution for calculating Fibonacci numbers and explain why it is efficient.
Hint
Explain the fill-up process in your solution.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
1 more question available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting