Merge pull request #5713 from YutharsanS/patch-1

Change of content in 104-exponential.md
pull/5716/head
dsh 5 months ago committed by GitHub
commit 83399589c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      src/data/roadmaps/computer-science/content/103-asymptotic-notation/103-common-runtimes/104-exponential.md

@ -6,7 +6,7 @@ Exponential algorithms are those that grow at a rate of 2^n. This means that for
def exponential(n):
if n == 0:
return 1
return 2 * exponential(n - 1)
return exponential(n - 1) + exponential(n - 1)
```
As you can see, the algorithm's runtime grows exponentially. For each additional input, the algorithm will take twice as long to run.

Loading…
Cancel
Save