Skip to content

Commit f2a0762

Browse files
committed
Updated Bubble sort
1 parent 012e30f commit f2a0762

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pygorithm/sorting/bubble_sort.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,8 @@ def sort(List):
1212
return List
1313

1414
# time complexities
15-
def bestcase_complexity():
16-
return 'O(n ^ 2)'
17-
18-
def averagecase_complexity():
19-
return 'O(n ^ 2)'
20-
21-
def worstcase_complexity():
22-
return 'O(n ^ 2)'
15+
def time_complexities():
16+
return '''Best Case: O(n ^ 2), Average Case: O(n ^ 2), Worst Case: O(n ^ 2)'''
2317

2418
# easily retrieve the source code of the sort function
2519
def get_code():

0 commit comments

Comments
 (0)