I was trying to understand the Data Structure and different algorithm, then i got confused to measure the Bubble sort time complexity.
for (c = 0; c < ( n
it does comparison between two elements. so in 1st Phase - n-1 comparison. i.e, 6 2nd phase - n-2 comparison. i.e, 5 and so on till 1. and thus, sum = n(n-1)/2 i.e O(n^2).
if there is any error you can correct.....