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
This question is part of this quiz :
Top MCQs on BubbleSort Algorithm with Answers