Bubble sort algorithm in python


 

Bubble sort in python

In [1]:
Enter the size of the array: 5
Enter the lements of the array: 
10
1
2
20
5
Sorted array is: 
1,2,5,10,20,

Time Complexity

Best case: O (n) 

Worst case: O (n * n)

No comments:

Post a Comment