Skip to content

Commit 03d7267

Browse files
authored
Merge branch 'TheAlgorithms:master' into master
2 parents 664da39 + 0182bca commit 03d7267

File tree

7 files changed

+1
-29
lines changed

7 files changed

+1
-29
lines changed

Backtracking/tests/RatInAMaze.test.js

-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ describe('RatInAMaze', () => {
66

77
for (const value of values) {
88
// we deliberately want to check whether this constructor call fails or not
9-
// eslint-disable-next-line no-new
109
expect(() => {
1110
new RatInAMaze(value)
1211
}).toThrow()
@@ -15,7 +14,6 @@ describe('RatInAMaze', () => {
1514

1615
it('should fail for an empty array', () => {
1716
// we deliberately want to check whether this constructor call fails or not
18-
// eslint-disable-next-line no-new
1917
expect(() => {
2018
new RatInAMaze([])
2119
}).toThrow()
@@ -28,7 +26,6 @@ describe('RatInAMaze', () => {
2826
]
2927

3028
// we deliberately want to check whether this constructor call fails or not
31-
// eslint-disable-next-line no-new
3229
expect(() => {
3330
new RatInAMaze(array)
3431
}).toThrow()
@@ -39,7 +36,6 @@ describe('RatInAMaze', () => {
3936

4037
for (const value of values) {
4138
// we deliberately want to check whether this constructor call fails or not
42-
// eslint-disable-next-line no-new
4339
expect(() => {
4440
new RatInAMaze(value)
4541
}).toThrow()

Backtracking/tests/Sudoku.test.js

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const solved = [
2727
describe('Sudoku', () => {
2828
it('should create a valid board successfully', () => {
2929
// we deliberately want to check whether this constructor call fails or not
30-
// eslint-disable-next-line no-new
3130
expect(() => {
3231
new Sudoku(data)
3332
}).not.toThrow()

Data-Structures/Array/QuickSelect.js

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
*/
1313

1414
function QuickSelect(items, kth) {
15-
// eslint-disable-line no-unused-vars
1615
if (kth < 1 || kth > items.length) {
1716
throw new RangeError('Index Out of Bound')
1817
}

Data-Structures/Queue/QueueUsing2Stacks.js

-18
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,6 @@ class Queue {
2929
return top
3030
}
3131
}
32-
33-
// display elements of the inputstack
34-
listIn(output = (value) => console.log(value)) {
35-
let i = 0
36-
while (i < this.inputStack.length) {
37-
output(this.inputStack[i])
38-
i++
39-
}
40-
}
41-
42-
// display element of the outputstack
43-
listOut(output = (value) => console.log(value)) {
44-
let i = 0
45-
while (i < this.outputStack.length) {
46-
output(this.outputStack[i])
47-
i++
48-
}
49-
}
5032
}
5133

5234
export { Queue }

Maths/test/EulerMethod.manual-test.js

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ function plotLine(label, points, width, height) {
1515

1616
// Chart-class from chartjs
1717
const chart = new Chart(canvas, {
18-
// eslint-disable-line
1918
type: 'scatter',
2019
data: {
2120
datasets: [

Maths/test/FindMinIterator.test.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@ describe('FindMinIterator', () => {
2222
})
2323

2424
test('given empty generator then min is undefined', () => {
25-
const src = function* () {} // eslint-disable-line
25+
const src = function* () {}
2626
expect(FindMinIterator(src())).toBeUndefined()
2727
})
2828

2929
test('given generator then min is found', () => {
3030
const src = function* () {
31-
// eslint-disable-line
3231
yield 1
3332
yield -1
3433
yield 0
@@ -38,7 +37,6 @@ describe('FindMinIterator', () => {
3837

3938
test('given string generator then min string length is found', () => {
4039
const src = function* () {
41-
// eslint-disable-line
4240
yield 'abc'
4341
yield 'de'
4442
yield 'qwerty'

Recursive/test/FloodFill.test.js

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ function testDepthFirst(
6969
replacementColor,
7070
testLocation
7171
) {
72-
// eslint-disable-line
7372
const rgbData = generateTestRgbData()
7473
depthFirstSearch(rgbData, fillLocation, targetColor, replacementColor)
7574
return rgbData[testLocation[0]][testLocation[1]]

0 commit comments

Comments
 (0)