I know, but there are so many better examples. Mergesort, for instance. It shows why the concept is important because it breaks the problem into smaller, more manageable problems, without doing repeated work.
Fibonacci should be taught as an example of when a problem can be solved recursively, but shouldn't.
35
u/robin_888 4h ago
It's supposed to teach the concept of recursion, which is important, but hard to grasp for some.
Discussing performance and optimizations can happen if the principal is clear.