Skip to content

Commit 69bffce

Browse files
committed
Updated Couting sort
1 parent cc6bd81 commit 69bffce

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pygorithm/sorting/counting_sort.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,8 @@ def sort(myList):
2828
print('Counting Sort can only be applied to integers')
2929

3030
# time complexities
31-
def bestcase_complexity():
32-
return 'O(n + k)'
33-
34-
def averagecase_complexity():
35-
return 'O(n + k)'
36-
37-
def worstcase_complexity():
38-
return 'O(n + k)'
31+
def time_complexities():
32+
return '''Best Case: O(n + k), Average Case: O(n + k), Worst Case: O(n + k)'''
3933

4034
# easily retrieve the source code of the sort function
4135
def get_code():

0 commit comments

Comments
 (0)