Question DSA-DP-0034
EasyHow can the space for computing Fibonacci numbers bottom-up be reduced from O(n) to O(1)?
- A.
Use a hash map
- B.
Use recursion
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Dynamic Programming question
How can the space for computing Fibonacci numbers bottom-up be reduced from O(n) to O(1)?
Use a hash map
Use recursion
Sign up free to see the answer and a step-by-step explanation.
Sort the table
Keep only the last two values instead of the whole table