Google Interview Question

Which is the quicker sort 'bubblesort' or 'quicksort' ?

Interview Answer

Anonymous

Oct 12, 2017

Initially, for a small unsorted population, Bubble Sort will appear efficient. However, as the population grows, Quick Sort performs much better and Bubble Sort loses performance greatly. This can be seen as time complexities for both: Quick Sort = average case O(n log n) Bubble Sort = average O(n^2) Quick Sort's worst case is the same as Bubble Sort's average case, which is O(n^2)