๐Ÿงช Bubble Sort Guided Worksheet

Goal: Sort in ascending order

Given List: [4, 2, 3, 1]

๐Ÿ”ต Pass 1

๐Ÿ‘‰ Compare 4 and 2
Condition: If 4 > 2 โ†’ swap; otherwise keep as is
โœ๏ธ Write new list:
๐Ÿ‘‰ Compare 4 and 3
Condition: If 4 > 3 โ†’ swap; otherwise keep as is
โœ๏ธ Write new list:
๐Ÿ‘‰ Compare 4 and 1
Condition: If 4 > 1 โ†’ swap; otherwise keep as is
โœ๏ธ Write new list:

๐Ÿ”ต Pass 2

๐Ÿ‘‰ Compare 2 and 3
Condition: If 2 > 3 โ†’ swap; otherwise keep as is
โœ๏ธ Write new list:
๐Ÿ‘‰ Compare 3 and 1
Condition: If 3 > 1 โ†’ swap; otherwise keep as is
โœ๏ธ Write new list:

๐Ÿ”ต Pass 3

๐Ÿ‘‰ Compare 2 and 1
Condition: If 2 > 1 โ†’ swap; otherwise keep as is
โœ๏ธ Write new list:

๐ŸŽฏ Final sorted list: [1, 2, 3, 4]