Bubble Sort!!! | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
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