This is the simplest sorting algorithm. In this algorithm, we just go through each item in the collection, compare two adjacent items, and swap them if they are not in the required order. We do this repetitively until no swaps are required.
You can consider this as one of the brute force techniques for sorting a collection. The complexity of this algorithm is O(n2) and it is considered one of the slowest sorting algorithms. The only reason we can use this algorithm is its simple implementation.