Computer Science for IGCSE & O level - Algorithm Design And Problem Solving (Section 7 - No. 22)

In the bubble sort algorithm, how many times will the outer loop run, if there are 'Length' number of items in the list?
Length times
Length - 1 times
Length + 1 times
Twice.

Explanation

The outer loop will perform the same amount of passes as the size of the list.

Comments (0)

Advertisement