Skip to content

Commit cc6bd81

Browse files
committed
Updated Bucket sort
1 parent f2a0762 commit cc6bd81

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

pygorithm/sorting/bucket_sort.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# bucket sort algorithm
77
def sort(myList, bucketSize = 5):
8-
from pygorithms.sorting import insertion_sort
8+
from pygorithm.sorting import insertion_sort
99
import math
1010

1111
string = False
@@ -49,14 +49,8 @@ def sort(myList, bucketSize = 5):
4949
return sortedArray
5050

5151
# time complexities
52-
def bestcase_complexity():
53-
return 'O(n)'
54-
55-
def averagecase_complexity():
56-
return 'O(n)'
57-
58-
def worstcase_complexity():
59-
return 'O(n)'
52+
def time_complexities():
53+
return '''Best Case: O(n), Average Case: O(n), Worst Case: O(n)'''
6054

6155
# easily retrieve the source code of the sort function
6256
def get_code():

0 commit comments

Comments
 (0)