next up previous
Next: Up: Previous:

Example



   BucketSort(A)                         COST*TIMES
      n = length(A)                       1
      for i = 1 to n                      n+1
         insert(A[i], B[floor(nA[i])]     n
      for i = 0 to n-1                    n+1
         InsertionSort(B[i])              n*T(InsertionSort)
      return(B[0].B[1].....B[n-1])        n


next up previous
Next: Up: Previous: