๐Ÿš€ Everything is free โ€” help us improve! Submit feedback and shape the platform.
โฑ๏ธPerf Optimizationยทintermediateยทโฑ๏ธ 20โ€“30mยทโญ 175 XP

M-010Speed Up Fibonacci

Description

The recursive Fibonacci function is too slow for large inputs. Optimize it.

Performance Target

Time Threshold
โ‰ค 50ms

Benchmarks

fib(30)
Medium input
fib(40)
Large input

Related Lessons

Click Run / Check to validate your solution