A comparison-based sorting algorithm that sorts an array by repeatedly swapping the first and last elements until they are in the correct order.