Top | MCQs on BubbleSort Algorithm with Answers | Question 4

Last Updated :
Discuss
Comments

What is the maximum number of comparisons that can take place when a bubble sort algorithm is implemented?, suppose there are n elements in the array.

n^2

n (n +1)

n(n-1)

(n*(n-1))/2

Share your thoughts in the comments