👉 In computer programming, an "unoptimized" algorithm or function is one that does not use all the available resources efficiently. This can result in slower execution times and higher resource usage.
For example, consider a simple algorithm that calculates the factorial of a number using recursion:
```python
def fact(n):
if n == 0:
return 1
else:
return n
fact(n-1)
```
This function uses two recursive calls to calculate the factorial. The first