 The algorithm starts at the beginning of the data set.It compares the first two elements, and if the first is greater than the second, it swaps them.It continues doing this for each pair of adjacent elements to the end of the data set.