Bucket sort
Sort a vector using bucket sort:
returns the sorted vector arr, based on provided isAscending condition (true
for ascending and false
for descending).
Example use case:
Running
, returns the following output:
Bucket sort works well for integer and float-like data types, for anything else, it can produce insufficient outputs.
Last updated