Implementing a single bubble sort