Skip to content

Commit 9f89a51

Browse files
delirious-lettucedonnemartin
authored andcommitted
Fix typos (donnemartin#191)
1 parent cd9e965 commit 9f89a51

33 files changed

+71
-71
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Refer to [Accessing the Challenges](https://github.com/donnemartin/interactive-c
5151
### Adding New Solutions to Existing Challenges
5252

5353
Challenges have multiple solutions. If adding new solutions to existing challenges:
54-
* Add your algorithm discusion and code solution to the existing notebook
54+
* Add your algorithm discussion and code solution to the existing notebook
5555
* Update the unit test to include your solution
5656
* Verify your code passes the unit tests
5757

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ interactive-coding-challenges # Repo
443443
├─ ...
444444
```
445445

446-
<i>\*The notebooks (.pynb) read/write the associated unit test (.py) file.</i>
446+
<i>\*The notebooks (.ipynb) read/write the associated unit test (.py) file.</i>
447447

448448

449449
## Notebook Installation

arrays_strings/hash_map/hash_map_challenge.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"\n",
5555
"* `get` no matching key -> KeyError exception\n",
5656
"* `get` matching key -> value\n",
57-
"* `set` no matchin gkey -> new key, value\n",
57+
"* `set` no matching key -> new key, value\n",
5858
"* `set` matching key -> update value\n",
5959
"* `remove` no matching key -> KeyError exception\n",
6060
"* `remove` matching key -> remove key, value"

arrays_strings/hash_map/hash_map_solution.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"\n",
5454
"* `get` no matching key -> KeyError exception\n",
5555
"* `get` matching key -> value\n",
56-
"* `set` no matchin gkey -> new key, value\n",
56+
"* `set` no matching key -> new key, value\n",
5757
"* `set` matching key -> update value\n",
5858
"* `remove` no matching key -> KeyError exception\n",
5959
"* `remove` matching key -> remove key, value"

arrays_strings/unique_chars/unique_chars_solution.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
"* Scan each character\n",
165165
"* For each character:\n",
166166
" * Scan all [other] characters in the array\n",
167-
" * Exluding the current character from the scan is rather tricky in Python and results in a non-Pythonic solution\n",
167+
" * Excluding the current character from the scan is rather tricky in Python and results in a non-Pythonic solution\n",
168168
" * If there is a match, return False\n",
169169
"* Return True\n",
170170
"\n",

graphs_trees/bst_validate/bst_validate_solution.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"source": [
7575
"## Algorithm\n",
7676
"\n",
77-
"We'll use a recursive solution that valides left <= current < right, passing down the min and max values as we do a depth-first traversal.\n",
77+
"We'll use a recursive solution that validates left <= current < right, passing down the min and max values as we do a depth-first traversal.\n",
7878
"\n",
7979
"* If the node is None, return True\n",
8080
"* If min is set and the node's value <= min, return False\n",
@@ -123,12 +123,12 @@
123123
" raise TypeError('No root node')\n",
124124
" return self._validate(self.root)\n",
125125
"\n",
126-
" def _validate(self, node, mininum=-sys.maxsize, maximum=sys.maxsize):\n",
126+
" def _validate(self, node, minimum=-sys.maxsize, maximum=sys.maxsize):\n",
127127
" if node is None:\n",
128128
" return True\n",
129-
" if node.data <= mininum or node.data > maximum:\n",
129+
" if node.data <= minimum or node.data > maximum:\n",
130130
" return False\n",
131-
" if not self._validate(node.left, mininum, node.data):\n",
131+
" if not self._validate(node.left, minimum, node.data):\n",
132132
" return False\n",
133133
" if not self._validate(node.right, node.data, maximum):\n",
134134
" return False\n",

graphs_trees/graph/graph_solution.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,17 @@
9393
"* incoming edge count (useful for algorithms such as topological sort)\n",
9494
"* adjacent nodes and edge weights\n",
9595
"\n",
96-
"#### add_neighhbor\n",
96+
"#### add_neighbor\n",
9797
"\n",
9898
"* If the neighbor doesn't already exist as an adjacent node\n",
99-
" * Update the adjancet nodes and edge weights\n",
99+
" * Update the adjacent nodes and edge weights\n",
100100
" * Increment the neighbor's incoming edge count\n",
101101
"\n",
102102
"Complexity:\n",
103103
"* Time: O(1)\n",
104104
"* Space: O(1)\n",
105105
"\n",
106-
"#### remove_neighhbor\n",
106+
"#### remove_neighbor\n",
107107
"\n",
108108
"* If the neighbor exists as an adjacent node\n",
109109
" * Decrement the neighbor's incoming edge count\n",

graphs_trees/graph_shortest_path/graph_shortest_path_challenge.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"source": [
6868
"## Test Cases\n",
6969
"\n",
70-
"The constaints state we don't have to check for negative edges, so we test with the general case.\n",
70+
"The constraints state we don't have to check for negative edges, so we test with the general case.\n",
7171
"\n",
7272
"<pre>\n",
7373
"graph.add_edge('a', 'b', weight=5)\n",

graphs_trees/graph_shortest_path/graph_shortest_path_solution.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"source": [
6767
"## Test Cases\n",
6868
"\n",
69-
"The constaints state we don't have to check for negative edges, so we test with the general case.\n",
69+
"The constraints state we don't have to check for negative edges, so we test with the general case.\n",
7070
"\n",
7171
"<pre>\n",
7272
"graph.add_edge('a', 'b', weight=5)\n",

math_probability/math_ops/math_ops_solution.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
" self.mean = None\n",
113113
" # Mode\n",
114114
" self.array = [0] * (upper_limit + 1)\n",
115-
" self.mode_ocurrences = 0\n",
115+
" self.mode_occurrences = 0\n",
116116
" self.mode = None\n",
117117
"\n",
118118
" def insert(self, val):\n",
@@ -128,8 +128,8 @@
128128
" self.mean = self.running_sum / self.num_items\n",
129129
" # Calculate the mode\n",
130130
" self.array[val] += 1\n",
131-
" if self.array[val] > self.mode_ocurrences:\n",
132-
" self.mode_ocurrences = self.array[val]\n",
131+
" if self.array[val] > self.mode_occurrences:\n",
132+
" self.mode_occurrences = self.array[val]\n",
133133
" self.mode = val"
134134
]
135135
},

0 commit comments

Comments
 (0)