Question - How does bubble sort work?
Answer -
Bubble sort is one of the most used sorting techniques out there. It is applied to arrays where elements adjacent to each other are compared and values are exchanged based on the order of arrangement. It’s called bubble sort because of the concept of exchanging elements like a bubble floating to the top of the water and larger entities sinking down to the bottom end.