Implemented bubble sort.