def bubbleSort(numbers)
sorted = false
until sorted
sorted = true
for i in 1..numbers.length-1
if numbers[i-1] > numbers[i]
numbers[i-1], numbers[i] = numbers[i], numbers[i-1]
sorted = false
end
end
end
print numbers
end
bubbleSort([7, 2, 5, 1, 9, 3])
ZGVmIGJ1YmJsZVNvcnQobnVtYmVycykKCXNvcnRlZCA9IGZhbHNlCgl1bnRpbCBzb3J0ZWQKCQlzb3J0ZWQgPSB0cnVlCgkJZm9yIGkgaW4gMS4ubnVtYmVycy5sZW5ndGgtMQoJCQlpZiBudW1iZXJzW2ktMV0gPiBudW1iZXJzW2ldCgkJCQludW1iZXJzW2ktMV0sIG51bWJlcnNbaV0gPSBudW1iZXJzW2ldLCBudW1iZXJzW2ktMV0KCQkJCXNvcnRlZCA9IGZhbHNlCgkJCWVuZAoJCWVuZAoJZW5kCglwcmludCBudW1iZXJzCmVuZAoKYnViYmxlU29ydChbNywgMiwgNSwgMSwgOSwgM10p