Bubble sort performs well when the list is _______ or nearly sorted because it requires fewer _______ to complete.

  • Presorted, comparisons
  • Randomized, swaps
  • Reversed, elements
  • Unsorted, iterations
Bubble sort performs well when the list is presorted or nearly sorted because it requires fewer comparisons to complete. In a nearly sorted list, many elements are already in their correct positions, reducing the number of swaps needed, making the algorithm more efficient in such scenarios.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *