Data update

This commit is contained in:
Ingy döt Net 2025-06-11 20:16:52 -04:00
parent 72eb4943cb
commit 4d5544505c
2347 changed files with 62432 additions and 16731 deletions

View file

@ -0,0 +1,17 @@
class Array
def bubble_sort!
i = size - 1
while i > 0
(1..i).each do |j|
swap(j, j-1) if self[j] < self[j-1]
end
i -= 1
end
self
end
end
arr = Array.new(20) { rand 100 }
p arr
p arr.bubble_sort!