f(n) = (n-1) + (n-2) + .......... + 2+1 = n(n-1)/2 - n2/2 +0(n) = 0(n2)
In the other words, the time required to execute the bubble sort algorithm is propositional to n2 where n is the number of input items.
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE