From 5b496e840303e6f0560e6e78f2fa9c355a44e321 Mon Sep 17 00:00:00 2001 From: Yutharsan Date: Wed, 22 May 2024 11:12:31 +0530 Subject: [PATCH] Change of content in 104-exponential.md There's a mistake in the example that has been provided. According to the complexity analysis, the current example yields the exponential time complexity, not the previous one. --- .../103-common-runtimes/104-exponential.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/roadmaps/computer-science/content/103-asymptotic-notation/103-common-runtimes/104-exponential.md b/src/data/roadmaps/computer-science/content/103-asymptotic-notation/103-common-runtimes/104-exponential.md index 3ba55af41..9d1a20565 100644 --- a/src/data/roadmaps/computer-science/content/103-asymptotic-notation/103-common-runtimes/104-exponential.md +++ b/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.