File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed
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

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.
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

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)