Presentation is loading. Please wait.

Presentation is loading. Please wait.

Decision Maths 1 Sorting Algorithms Bubble Sort A V Ali : www.2july-maths.co.uk 1.Start at the beginning of the data set. 2.Compare the first two elements,

Similar presentations


Presentation on theme: "Decision Maths 1 Sorting Algorithms Bubble Sort A V Ali : www.2july-maths.co.uk 1.Start at the beginning of the data set. 2.Compare the first two elements,"— Presentation transcript:

1 Decision Maths 1 Sorting Algorithms Bubble Sort A V Ali : 1.Start at the beginning of the data set. 2.Compare the first two elements, and if the first is greater than the second, swaps them. 3.Continue doing this for each pair of adjacent elements to the end of the data set. 4.Start again with the first two elements, repeating until no swaps have occurred on the last pass.

2 Bubble Sort Pass

3 Pass

4 Pass

5 Pass

6 Pass Sorted !!!


Download ppt "Decision Maths 1 Sorting Algorithms Bubble Sort A V Ali : www.2july-maths.co.uk 1.Start at the beginning of the data set. 2.Compare the first two elements,"

Similar presentations


Ads by Google