mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-13 18:00:18 +08:00
@@ -511,7 +511,7 @@ Consider the following code, the term "worst-case" in worst-case space complexit
|
||||
/* Recursion O(n) */
|
||||
void recur(int n) {
|
||||
if (n == 1) return;
|
||||
return recur(n - 1);
|
||||
recur(n - 1);
|
||||
}
|
||||
```
|
||||
|
||||
@@ -531,7 +531,7 @@ Consider the following code, the term "worst-case" in worst-case space complexit
|
||||
/* Recursion O(n) */
|
||||
void recur(int n) {
|
||||
if (n == 1) return;
|
||||
return recur(n - 1);
|
||||
recur(n - 1);
|
||||
}
|
||||
```
|
||||
|
||||
@@ -660,7 +660,7 @@ Consider the following code, the term "worst-case" in worst-case space complexit
|
||||
/* Recursion O(n) */
|
||||
void recur(int n) {
|
||||
if (n == 1) return;
|
||||
return recur(n - 1);
|
||||
recur(n - 1);
|
||||
}
|
||||
```
|
||||
|
||||
@@ -702,7 +702,7 @@ Consider the following code, the term "worst-case" in worst-case space complexit
|
||||
/* Recursion O(n) */
|
||||
void recur(int n) {
|
||||
if (n == 1) return;
|
||||
return recur(n - 1);
|
||||
recur(n - 1);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user