def bubble_sort(array)
for i in 1..array.length-1
array[i], array[i-1] = array[i-1], array[i] if array[i] < array[i-1]
end
array
end
p bubble_sort([2, 1, 6, 3, 7, 4])
ZGVmIGJ1YmJsZV9zb3J0KGFycmF5KQoJZm9yIGkgaW4gMS4uYXJyYXkubGVuZ3RoLTEKCQlhcnJheVtpXSwgYXJyYXlbaS0xXSA9IGFycmF5W2ktMV0sIGFycmF5W2ldIGlmIGFycmF5W2ldIDwgYXJyYXlbaS0xXQoJZW5kCglhcnJheQplbmQKCgpwIGJ1YmJsZV9zb3J0KFsyLCAxLCA2LCAzLCA3LCA0XSk=