Question:

Write a program to perform bubble sort on [85,63,0,12,47,96,52]

Program:

Explanation:

Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order.

Output:

 

Leave a Reply

bodrum escort - eskişehir esc - mersin escort - mersin escort bayan - mersin esc