mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-31 06:33:44 +00:00
parent
8d3665b638
commit
c0033f92ad
|
@ -14,7 +14,7 @@
|
||||||
# Best Case O(n); Average Case O(n); Worst Case O(n)
|
# Best Case O(n); Average Case O(n); Worst Case O(n)
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from P26_InsertionSort import insertionSort
|
from insertion_sort import insertion_sort
|
||||||
import math
|
import math
|
||||||
|
|
||||||
DEFAULT_BUCKET_SIZE = 5
|
DEFAULT_BUCKET_SIZE = 5
|
||||||
|
@ -46,7 +46,7 @@ def bucketSort(myList, bucketSize=DEFAULT_BUCKET_SIZE):
|
||||||
# Sort buckets and place back into input array
|
# Sort buckets and place back into input array
|
||||||
sortedArray = []
|
sortedArray = []
|
||||||
for i in range(0, len(buckets)):
|
for i in range(0, len(buckets)):
|
||||||
insertionSort(buckets[i])
|
insertion_sort(buckets[i])
|
||||||
for j in range(0, len(buckets[i])):
|
for j in range(0, len(buckets[i])):
|
||||||
sortedArray.append(buckets[i][j])
|
sortedArray.append(buckets[i][j])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user