Skip to content

Commit 1e32eef

Browse files
committed
chore: update spelling mistakes
1 parent 1d252d7 commit 1e32eef

19 files changed

+27
-25
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ yarn-error.log*
1414

1515
# intelliJ workspace folder
1616
.idea
17+
.vscode
18+
.trae
1719

1820
/coverage

Ciphers/KeyFinder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function keyFinder(str) {
5252
return k // return the key number if founded
5353
}
5454
outStrElement = '' // reset the temp word
55-
} // end for ( let i=0; i < wordBank.length; i++)
55+
} // end for (let i=0; i < wordBank.length; i++)
5656
}
5757
}
5858
return 0 // return 0 if found nothing

DIRECTORY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
* [UpperCaseConversion](Conversions/UpperCaseConversion.js)
7070
* **Data-Structures**
7171
* **Array**
72-
* [LocalMaximomPoint](Data-Structures/Array/LocalMaximomPoint.js)
72+
* [LocalMaximumPoint](Data-Structures/Array/LocalMaximumPoint.js)
7373
* [NumberOfLocalMaximumPoints](Data-Structures/Array/NumberOfLocalMaximumPoints.js)
7474
* [QuickSelect](Data-Structures/Array/QuickSelect.js)
7575
* [Reverse](Data-Structures/Array/Reverse.js)

Data-Structures/Array/LocalMaximomPoint.js renamed to Data-Structures/Array/LocalMaximumPoint.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ const findMaxPointIndex = (
4444
}
4545
}
4646

47-
const LocalMaximomPoint = (A) => findMaxPointIndex(A, 0, A.length - 1, A.length)
47+
const LocalMaximumPoint = (A) => findMaxPointIndex(A, 0, A.length - 1, A.length)
4848

49-
export { LocalMaximomPoint }
49+
export { LocalMaximumPoint }
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
import { LocalMaximomPoint } from '../LocalMaximomPoint'
1+
import { LocalMaximumPoint } from '../LocalMaximumPoint'
22

33
describe('LocalMaximumPoint tests', () => {
44
it('test boundary maximum points - last element', () => {
55
const Array = [1, 2, 3, 4, 5, 6, 12]
6-
expect(LocalMaximomPoint(Array)).toEqual(6)
6+
expect(LocalMaximumPoint(Array)).toEqual(6)
77
})
88

99
it('test boundary maximum points - first element', () => {
1010
const Array2 = [13, 6, 5, 4, 3, 2, 1]
11-
expect(LocalMaximomPoint(Array2)).toEqual(0)
11+
expect(LocalMaximumPoint(Array2)).toEqual(0)
1212
})
1313

14-
it('test boundary maximum points - should find first maximom point from the top', () => {
14+
it('test boundary maximum points - should find first maximum point from the top', () => {
1515
// Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions)
1616
const Array = [13, 2, 3, 4, 5, 6, 12]
17-
expect(LocalMaximomPoint(Array)).toEqual(6)
17+
expect(LocalMaximumPoint(Array)).toEqual(6)
1818
})
1919

2020
it('test inner points - second element', () => {
2121
const Array2 = [13, 16, 5, 4, 3, 2, 1]
22-
expect(LocalMaximomPoint(Array2)).toEqual(1)
22+
expect(LocalMaximumPoint(Array2)).toEqual(1)
2323
})
2424

2525
it('test inner points - element some where in the middle', () => {
2626
const Array2 = [13, 16, 5, 41, 3, 2, 1]
27-
expect(LocalMaximomPoint(Array2)).toEqual(3)
27+
expect(LocalMaximumPoint(Array2)).toEqual(3)
2828
})
2929
})

Data-Structures/Array/test/NumberOfLocalMaximumPoints.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { NumberOfLocalMaximumPoints } from '../NumberOfLocalMaximumPoints'
22

3-
describe('LocalMaximomPoint tests', () => {
3+
describe('LocalMaximumPoint tests', () => {
44
it('test boundary maximum points - last element', () => {
55
const Array = [1, 2, 3, 4, 5, 6, 12]
66
expect(NumberOfLocalMaximumPoints(Array)).toEqual(1)

Data-Structures/Tree/SegmentTree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class SegmentTree {
6464
}
6565
}
6666

67-
// interval [L,R) with left index(L) included and right (R) excluded.
67+
// interval [L, R) with left index(L) included and right (R) excluded.
6868
query(left, right) {
6969
const { size, tree } = this
7070
// cause R is excluded, increase right for convenient

Dynamic-Programming/UniquePaths.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const uniquePaths = (m, n) => {
3030
for (let j = 1; j < m; j++) {
3131
// paths[j] in RHS represents the cell value stored above the current cell
3232
// paths[j-1] in RHS represents the cell value stored to the left of the current cell
33-
// paths [j] on the LHS represents the number of distinct pathways to the cell (i,j)
33+
// paths [j] on the LHS represents the number of distinct pathways to the cell (i, j)
3434
paths[j] = paths[j - 1] + paths[j]
3535
}
3636
}

Geometry/ConvexHullGraham.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function compare(a, b) {
1313
return 1
1414
}
1515
function orientation(a, b, c) {
16-
// Check orientation of Line(a,b) and Line(b,c)
16+
// Check orientation of Line(a, b) and Line(b, c)
1717
const alpha = (b.y - a.y) / (b.x - a.x)
1818
const beta = (c.y - b.y) / (c.x - b.x)
1919

Graphs/Dijkstra.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
function createGraph(V, E) {
1010
// V - Number of vertices in graph
11-
// E - Number of edges in graph (u,v,w)
11+
// E - Number of edges in graph (u, v, w)
1212
const adjList = [] // Adjacency list
1313
for (let i = 0; i < V; i++) {
1414
adjList.push([])

0 commit comments

Comments
 (0)