This chapter's bubble sort method is less efficient than it could be. If a pass through the list is done without swapping any components, the list is sorted and there is no reason to continue. Change this algorithm to terminate as soon as it recognises that the list is sorted. A break statement should not be used.This chapter's bubble sort method is less efficient than it could be. If a pass through the list is done without swapping any components, the list is sorted and there is no reason to continue. Change this algorithm to terminate as soon as it recognises that the list is sorted. A break statement should not be used.
This chapter's bubble sort method is less efficient than it could be. If a pass through the list is done without swapping any components, the list is sorted and there is no reason to continue. Change this
Step by step
Solved in 3 steps with 1 images