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 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]. 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
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
[3, 5, 1, 4, 2]
Step 2
Step 2: Compare 5 and 1
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
[3, 1, 5, 4, 2]
Step 3
Step 3: Compare 5 and 4
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
[3, 1, 4, 5, 2]
Step 4
Step 4: Compare 5 and 2
98%
120 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
[3, 1, 4, 2, 5]
Step 5
Step 5: Compare 3 and 1
97%
117 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
[1, 3, 4, 2, 5]
Step 6
Step 6: Compare 4 and 2
97%
121 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
[1, 3, 2, 4, 5]
Step 7
Step 7: Compare 3 and 2
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!