Answer:
A. 15,10,20,18 -- 15,10,18,20 -- 10,15,18,20
Step-by-step explanation:
Bubble sorting can be defined as a technique or methodology whereby numbers that are not in their proper order are sorted into proper order that is from smallest to highest( increasing to decreasing order).
The method of bubble sorting involves the shuffling or swapping of adjacent numbers until the numbers are well sorted or arranged.
In the above question, we were given, a set of numbers:
15, 20, 10, 18
Step 1
20 is adjacent to 10
20 > 10
hence we swap
= 15,10,20,18
Step 2
From, 15,10, 20,18
20 is adjacent to 18
20 > 18
hence we swap
= 15,10,18,20
Step 3
From step 2, which gave us 15,10,18,20
15 us adjacent to 10
15 > 10
We swap
= 10,15,18,20
Hence,
15, 20, 10, 18 -- 15,10,20,18 -- 15,10,18,20 -- 10,15,18,20
Therefore, Option A is the correct option.