Use local insertion sort (solves #334) (#370)

This commit is contained in:
rafa leyva ruiz 2018-10-02 10:46:56 +02:00 committed by Anshul
parent 8d3665b638
commit c0033f92ad

View File

@ -14,7 +14,7 @@
# Best Case O(n); Average Case O(n); Worst Case O(n)
from __future__ import print_function
from P26_InsertionSort import insertionSort
from insertion_sort import insertion_sort
import math
DEFAULT_BUCKET_SIZE = 5
@ -46,7 +46,7 @@ def bucketSort(myList, bucketSize=DEFAULT_BUCKET_SIZE):
# Sort buckets and place back into input array
sortedArray = []
for i in range(0, len(buckets)):
insertionSort(buckets[i])
insertion_sort(buckets[i])
for j in range(0, len(buckets[i])):
sortedArray.append(buckets[i][j])