Bubble Sort

Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order.

It has same average complexity with insertion sort, O(N^2). Because it loops twice through the whole index of array.

results matching ""

    No results matching ""