The Gateway to Computer Science Excellence
0 votes
34 views
BUCKET-SORT(A)
1      let B[0...n-1] be a new array
2      n = A.length
3      for i – 0 to n – 1
4      make B[i] an empty list
5      for i = 1 to n
6      insert A[i] into list B[nA[i]]
7      for i = 0 to n – 1
8      sort list B[i] with insertion sort
9      concatenate the lists B[0] , B[1] , ….,B[n-1] together in order

illustrate the operation of BUCKET-SORT on the array $A=\langle  .79,.13,.16,.64,.39,.20,.89,.53,.71,.42\rangle$

in Algorithms by Boss (41.9k points) | 34 views

1 Answer

0 votes

this might help

 

by Active (1.3k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,647 questions
56,492 answers
195,439 comments
100,704 users