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