Page 3 - Lesson Note-Python Modules and Sorting
P. 3

Bubble Sort




















               Different Pass and Time Complexity, Bubble Sort



















































               Total steps/comparison=??
               Total number of comparisons:
                                                                2
               (N-1)+(N-2)+(N-3)+..........+3+2+1 = (N(N-1) )/2  ≅  O(N )
   1   2   3   4