Skip to content

Fix four typos #1139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
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])`.
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])`.

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

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

Expand Down
2 changes: 1 addition & 1 deletion src/algorithms/uncategorized/n-queens/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ and return false.
queen here leads to a solution.
b) If placing queen in [row, column] leads to a solution then return
true.
c) If placing queen doesn't lead to a solution then umark this [row,
c) If placing queen doesn't lead to a solution then unmark this [row,
column] (Backtrack) and go to step (a) to try other rows.
3) If all rows have been tried and nothing worked, return false to trigger
backtracking.
Expand Down
2 changes: 1 addition & 1 deletion src/data-structures/bloom-filter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ three factors: the size of the bloom filter, the
number of hash functions we use, and the number
of items that have been inserted into the filter.

The formula to calculate probablity of a false positive is:
The formula to calculate probability of a false positive is:

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

Expand Down
2 changes: 1 addition & 1 deletion src/data-structures/heap/Heap.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export default class Heap {
/* istanbul ignore next */
pairIsInCorrectOrder(firstElement, secondElement) {
throw new Error(`
You have to implement heap pair comparision method
You have to implement heap pair comparison method
for ${firstElement} and ${secondElement} values.
`);
}
Expand Down