Skip to content

Commit 1e3b707

Browse files
authored
Merge pull request #30 from ashu01/master
best case for Bubble sort
2 parents 5793462 + 8be6e2d commit 1e3b707

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygorithm/sorting/bubble_sort.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def improved_sort(List):
2626

2727
# time complexities
2828
def time_complexities():
29-
return '''Best Case: O(n ^ 2), Average Case: O(n ^ 2), Worst Case: O(n ^ 2) \n For Improved Bubble Sort: \n Best Case: O(n); Average Case: O(n * (n - 1) / 4); Worst Case: O(n ^ 2) '''
29+
return '''Best Case: O(n) , Average Case: O(n ^ 2), Worst Case: O(n ^ 2) \n For Improved Bubble Sort: \n Best Case: O(n); Average Case: O(n * (n - 1) / 4); Worst Case: O(n ^ 2) '''
3030

3131
# easily retrieve the source code of the sort function
3232
def get_code():

0 commit comments

Comments
 (0)