Skip to content
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
4 changes: 4 additions & 0 deletions DIRECTORY.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -142,6 +142,7 @@
* [BinaryExponentiationRecursive](Maths/BinaryExponentiationRecursive.js)
* [BisectionMethod](Maths/BisectionMethod.js)
* [CheckKishnamurthyNumber](Maths/CheckKishnamurthyNumber.js)
* [CollatzSequence](Maths/CollatzSequence.js)
* [Coordinate](Maths/Coordinate.js)
* [CoPrimeCheck](Maths/CoPrimeCheck.js)
* [DecimalExpansion](Maths/DecimalExpansion.js)
Expand All@@ -159,13 +160,15 @@
* [FigurateNumber](Maths/FigurateNumber.js)
* [FindHcf](Maths/FindHcf.js)
* [FindLcm](Maths/FindLcm.js)
* [FindMaxRecursion](Maths/FindMaxRecursion.js)
* [FindMin](Maths/FindMin.js)
* [FindMinIterator](Maths/FindMinIterator.js)
* [GetEuclidGCD](Maths/GetEuclidGCD.js)
* [GridGet](Maths/GridGet.js)
* [IsDivisible](Maths/IsDivisible.js)
* [IsEven](Maths/IsEven.js)
* [IsOdd](Maths/IsOdd.js)
* [IsPronic](Maths/IsPronic.js)
* [LeapYear](Maths/LeapYear.js)
* [LinearSieve](Maths/LinearSieve.js)
* [LucasSeries](Maths/LucasSeries.js)
Expand DownExpand Up@@ -197,6 +200,7 @@
* [SquareRoot](Maths/SquareRoot.js)
* [SumOfDigits](Maths/SumOfDigits.js)
* [SumOfGeometricProgression](Maths/SumOfGeometricProgression.js)
* [TwinPrime](Maths/TwinPrime.js)
* [Volume](Maths/Volume.js)
* [WhileLoopFactorial](Maths/WhileLoopFactorial.js)
* [ZellersCongruenceAlgorithm](Maths/ZellersCongruenceAlgorithm.js)
Expand Down
2 changes: 1 addition & 1 deletion Sorts/FindSecondLargestElement.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@

const secondLargestElement = (array) => {
const largestElement = Math.max(...array)
Comment thread
raklaptudirm marked this conversation as resolved.
let element = 0
let element = -Number.MAX_VALUE

for (let i = 0; i < array.length; i++) {
if (element < array[i] && array[i] !== largestElement) {
Expand Down