Space | Time | |
---|---|---|
Linear Recursion | Θ(e) | Θ(e) |
Linear Iteration | Θ(1) | Θ(e) |
Tree Recursion | Θ(log e) | Θ(e) |
Logarithmic Recursion | Θ(log e) | Θ(log e) |
Logarithmic Iteration | Θ(1) | Θ(log e) |
Here is a graph comparing the functions Θ(1) (red), Θ(log e) (purple), and Θ(e) (green), where the horizontal axis extends to e = 25: