0

Bubble Sort!!!

Please help me with bubble sort algorithm and how it works!!! input/output operations, sequence of the operations, and control-flow of the operations.

26th Mar 2019, 12:42 PM
Raj Chaudhary
Raj Chaudhary - avatar
3 odpowiedzi
26th Mar 2019, 12:48 PM
Seniru
Seniru - avatar
0
Thank you!!!
26th Mar 2019, 3:07 PM
Raj Chaudhary
Raj Chaudhary - avatar
0
“In the worst scenario, where all elements need to be swapped, it will require (n-1)+(n-2)+(n-3)+...+3+2+1 = n(n-1)/2 swaps (n is the number of elements)” ,,,,,, i didn’t get this one. please help!!!
26th Mar 2019, 4:22 PM
Raj Chaudhary
Raj Chaudhary - avatar