Update formatting

This commit is contained in:
Isabelle Viktoria Maciohsek
2022-01-29 20:36:07 +02:00
parent a2f959334b
commit c56b5a11da
16 changed files with 23 additions and 22 deletions

View File

@ -7,7 +7,7 @@ lastUpdated: 2020-12-29T12:22:44+02:00
Sorts an array of numbers, using the bucket sort algorithm.
- Use `Math.min(),` `Math.max()` and the spread operator (`...`) to find the minimum and maximum values of the given array.
- Use `Math.min()`, `Math.max()` and the spread operator (`...`) to find the minimum and maximum values of the given array.
- Use `Array.from()` and `Math.floor()` to create the appropriate number of `buckets` (empty arrays).
- Use `Array.prototype.forEach()` to populate each bucket with the appropriate elements from the array.
- Use `Array.prototype.reduce()`, the spread operator (`...`) and `Array.prototype.sort()` to sort each bucket and append it to the result.