mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-06 17:50:39 +08:00
Changed implementation presentation | Flash Sort
This commit is contained in:
@ -77,11 +77,14 @@ function flashSort (arr) {
|
|||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of Flash Sort
|
||||||
|
*/
|
||||||
const array = [3, 0, 2, 5, -1, 4, 1, -2]
|
const array = [3, 0, 2, 5, -1, 4, 1, -2]
|
||||||
|
// Before Sort
|
||||||
// Array before Sort
|
console.log('\n- Before Sort | Implementation of Flash Sort -')
|
||||||
console.log('-----before sorting-----')
|
|
||||||
console.log(array)
|
console.log(array)
|
||||||
// Array after sort
|
// After Sort
|
||||||
console.log('-----after sorting-----')
|
console.log('- After Sort | Implementation of Flash Sort -')
|
||||||
console.log(flashSort(array))
|
console.log(flashSort(array))
|
||||||
|
console.log('\n')
|
Reference in New Issue
Block a user