This is a Ruby implementation of bubble sort
(Array of numbers)
Array of numbers sorted ascending
Given an array of numbers, use a bubble sorting algorithm to sort them ascending
Iteration over an array, helper variables to determine when the array was sorted, and logic to improve performance by restricting the length of the array to iterate over
A basic bubble sorting algorithm and how to optimize it (due to the observation that the last N items in an array are always sorted after N passes through the array)