Skip to content

Commit 6800ddb

Browse files
authored
Fixed even more typos in recursion approach. (#3785)
1 parent dd39c71 commit 6800ddb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

exercises/practice/wordy/.approaches/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
{
3636
"uuid": "2e643b88-9b76-45a1-98f4-b211919af061",
3737
"slug": "recursion",
38-
"title": "Recursion for iteration.",
38+
"title": "Recursion for Iteration.",
3939
"blurb": "Use recursion with other strategies to solve word problems.",
4040
"authors": ["BethanyG"]
4141
},

exercises/practice/wordy/.approaches/recursion/content.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Recursion
1+
# Recursion for Iteration
22

33

44
[Any function that can be written iteratively (_with loops_) can be written using recursion][recursion-and-iteration], and [vice-versa][recursion-is-not-a-superpower].
55
A recursive strategy [may not always be obvious][looping-vs-recursion] or easy — but it is always possible.
66
So the `while-loop`s used in other approaches to Wordy can be re-written to use recursive calls.
77

8-
That being said, Pyton famously does not perform [tail-call optimization][tail-call-optimization], and limits recursive calls on the stack to a depth of 1000 frames, so it is important to only use recursion where you are confident that it can complete within the limit (_or something close to it_).
8+
That being said, Python famously does not perform [tail-call optimization][tail-call-optimization], and limits recursive calls on the stack to a depth of 1000 frames, so it is important to only use recursion where you are confident that it can complete within the limit (_or something close to it_).
99
[Memoization][memoization] and other strategies in [dynamic programming][dynamic-programming] can help to make recursion more efficient and "shorter" in Python, but it's always good to give it careful consideration.
1010

1111
Recursion works best with problem spaces that resemble trees, include [backtracking][backtracking], or become progressively smaller.
12-
Some examples include financial processes like calculating [amortization][amortization] and [depreciation][depreciation], tracking [radiation reduction through nuclei decay][nuclei-decay], and algorithms like [biscetion search][bisection-search], [depth-firs search][dfs], and [merge sort][merge-sort]_).
12+
Some examples include financial processes like calculating [amortization][amortization] and [depreciation][depreciation], tracking [radiation reduction through nuclei decay][nuclei-decay], and algorithms like [biscetion search][bisection-search], [depth-firs search][dfs], and [merge sort][merge-sort].
1313

14-
Other algorithms such as [breadth-first search][bfs], [Dijkstra's algorithm][dijkstra], and [Bellman-Ford Algorithm][bellman-ford] lend themselves better to iteration.
14+
Other algorithms such as [breadth-first search][bfs], [Dijkstra's algorithm][dijkstra], and the [Bellman-Ford Algorithm][bellman-ford] lend themselves better to iteration.
1515

1616

1717
```python
@@ -170,7 +170,7 @@ def calculate(question):
170170
```
171171

172172

173-
This variation shows how the dictionary of operators from `operator` can be augmented with [regex][re] to perform string matching for a question.
173+
This variation shows how the dictionary of operators from `operator` can be augmented with [regex][re] to perform string matching for a question.
174174
Regex are also used here to check that a question is a valid and to ensure that the base case (_nothing but digits are left in the question_) is met for the recursive call in `calculate()`.
175175
The regex patterns use [named groups][named-groups] for easy reference, but it's not necessary to do so.
176176

0 commit comments

Comments
 (0)