Nice effort to implement, I think it is most popular sorting technique. The process is simple, you keep comparing pairs of adjacent elements of the sequence, if the they are in the wrong order swap them and do this till there are no swapping to do.