Which Sorting Algorithm is more efficient :
Bubble or Merge
Merge Sort
Merge has O ( n log n) Bubble is O (1) best case and O (n^2) worst case
Divide and Conquer Algorithm?
Merge Sort
Time Complexity of Bubble Sort?
O ( 1 ) Best case
O ( n^2 ) Worst case
What is the time complexity of Merge Sort?
O ( n log n )
Sort this array into ascending order using bubble :
4 3 5 7 6
brackets show switches/checks
Sort this array into ascending order using merge:
Tom Sue Jack Bill Ada