mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-11-10 11:09:43 +08:00
Merge a706505834
into ca3d16dcce
This commit is contained in:
commit
0cd50f7d2b
@ -27,9 +27,13 @@ describe('CountingSort', () => {
|
||||
const sorter = new CountingSort({ visitingCallback });
|
||||
|
||||
// Detect biggest number in array in prior.
|
||||
// Original array remains same
|
||||
|
||||
const biggestElement = Math.max(...notSortedArr);
|
||||
|
||||
// Detect smallest number in array in prior.
|
||||
// Original array remains same
|
||||
|
||||
const smallestElement = Math.min(...notSortedArr);
|
||||
|
||||
const sortedArray = sorter.sort(notSortedArr, smallestElement, biggestElement);
|
||||
|
Loading…
Reference in New Issue
Block a user