3 ms·
Still hoping we'll eventually stop using Fibonacci to show off recursion, because that's one of those examples where the maths might be expressed as recursive r
by TheRealPomax 3y ago
Still hoping we'll eventually stop using Fibonacci to show off recursion, because that's one of those examples where the maths might be expressed as recursive relation, but the implementation should never be =)
Good AI would go "you don't want that, that's horribly inefficient. Here's an actually performant implementation based on the closed-form expression".
- zopa 3y agoNah, good AI would run in the compiler and optimize the recursion into something fast.
- Wowfunhappy 3y agoWhat is your preferred example for teaching a beginner to use recursion?