Q. Why do number-of-comparisons reduce in every successive iteration in bubble sort?



Answer =

There is no need to compare against the last elements of list, because it was put in the correct position on the previous pass.


Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post