Skip to content

Commit 3c72ab1

Browse files
committed
Updated Heap sort
1 parent 69bffce commit 3c72ab1

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pygorithm/sorting/heap_sort.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,8 @@ def shiftDown(alist, start, end):
3636
return
3737

3838
# time complexities
39-
def bestcase_complexity():
40-
return 'O(nlogn)'
41-
42-
def averagecase_complexity():
43-
return 'O(nlogn)'
44-
45-
def worstcase_complexity():
46-
return 'O(nlogn)'
39+
def time_complexities():
40+
return '''Best Case: O(nlogn), Average Case: O(nlogn), Worst Case: O(nlogn)'''
4741

4842
# easily retrieve the source code of the sort function
4943
def get_code():

0 commit comments

Comments
 (0)