Skip to content

Commit 76d6769

Browse files
authored
Merge branch 'master' into master
2 parents b188e11 + 9046d80 commit 76d6769

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ be accessed and modified efficiently. More precisely, a data structure is a coll
4848
values, the relationships among them, and the functions or operations that can be applied to
4949
the data.
5050

51+
Remember that each data has its own trade-offs. And you need to pay attention more to why you're choosing a certain data structure than to how to implement it.
52+
5153
`B` - Beginner, `A` - Advanced
5254

5355
* `B` [Linked List](src/data-structures/linked-list)

src/algorithms/uncategorized/best-time-to-buy-sell-stocks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Let's say we have an array of prices `[7, 6, 4, 3, 1]` and we're on the _1st_ da
4646
1. _Option 1: Keep the money_ → profit would equal to the profit from buying/selling the rest of the stocks → `keepProfit = profit([6, 4, 3, 1])`.
4747
2. _Option 2: Buy/sell at current price_ → profit in this case would equal to the profit from buying/selling the rest of the stocks plus (or minus, depending on whether we're selling or buying) the current stock price → `buySellProfit = -7 + profit([6, 4, 3, 1])`.
4848

49-
The overall profit would be equal to → `overalProfit = Max(keepProfit, buySellProfit)`.
49+
The overall profit would be equal to → `overallProfit = Max(keepProfit, buySellProfit)`.
5050

5151
As you can see the `profit([6, 4, 3, 1])` task is being solved in the same recursive manner.
5252

src/algorithms/uncategorized/n-queens/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ and return false.
5959
queen here leads to a solution.
6060
b) If placing queen in [row, column] leads to a solution then return
6161
true.
62-
c) If placing queen doesn't lead to a solution then umark this [row,
62+
c) If placing queen doesn't lead to a solution then unmark this [row,
6363
column] (Backtrack) and go to step (a) to try other rows.
6464
3) If all rows have been tried and nothing worked, return false to trigger
6565
backtracking.

src/data-structures/bloom-filter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ three factors: the size of the bloom filter, the
9393
number of hash functions we use, and the number
9494
of items that have been inserted into the filter.
9595

96-
The formula to calculate probablity of a false positive is:
96+
The formula to calculate probability of a false positive is:
9797

9898
( 1 - e <sup>-kn/m</sup> ) <sup>k</sup>
9999

src/data-structures/heap/Heap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export default class Heap {
279279
/* istanbul ignore next */
280280
pairIsInCorrectOrder(firstElement, secondElement) {
281281
throw new Error(`
282-
You have to implement heap pair comparision method
282+
You have to implement heap pair comparison method
283283
for ${firstElement} and ${secondElement} values.
284284
`);
285285
}

0 commit comments

Comments
 (0)