Photo AI

Fill in the blank arrays to show the steps involved in applying the bubble sort algorithm to the array [3, 5, 1, 4, 2] - AQA - GCSE Computer Science - Question 11 - 2021 - Paper 1

Question icon

Question 11

Fill-in-the-blank-arrays-to-show-the-steps-involved-in-applying-the-bubble-sort-algorithm-to-the-array-[3,-5,-1,-4,-2]-AQA-GCSE Computer Science-Question 11-2021-Paper 1.png

Fill in the blank arrays to show the steps involved in applying the bubble sort algorithm to the array [3, 5, 1, 4, 2]. You only need to show the missing steps where... show full transcript

Worked Solution & Example Answer:Fill in the blank arrays to show the steps involved in applying the bubble sort algorithm to the array [3, 5, 1, 4, 2] - AQA - GCSE Computer Science - Question 11 - 2021 - Paper 1

Step 1

Step 1: Compare 3 and 5

96%

114 rated

Answer

[3, 5, 1, 4, 2]

Step 2

Step 2: Compare 5 and 1

99%

104 rated

Answer

[3, 1, 5, 4, 2]

Step 3

Step 3: Compare 5 and 4

96%

101 rated

Answer

[3, 1, 4, 5, 2]

Step 4

Step 4: Compare 5 and 2

98%

120 rated

Answer

[3, 1, 4, 2, 5]

Step 5

Step 5: Compare 3 and 1

97%

117 rated

Answer

[1, 3, 4, 2, 5]

Step 6

Step 6: Compare 4 and 2

97%

121 rated

Answer

[1, 3, 2, 4, 5]

Step 7

Step 7: Compare 3 and 2

96%

114 rated

Answer

[1, 2, 3, 4, 5]

Join the GCSE students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;