Bubble count:-
Consider the list L = (5, 3, 1, 2, 4).
(a) Sort the list L with bubble sort and count the number of exchanges required.
(b) Sort the list L, which has the reverse order of L, and count the number of exchanges required.
(c) Is the sum of these exchanges equal to n(n-1)/2, where n is the length of the list?