Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

bucket sort

bucketSort(arr[], n)
1) Create n empty buckets (Or lists).
2) Do following for every array element arr[i].
.......a) Insert arr[i] into bucket[n*array[i]]
3) Sort individual buckets using insertion sort.
4) Concatenate all sorted buckets.
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #bucket #sort
ADD COMMENT
Topic
Name
2+4 =