Bogosort in ruby
Yesterday, I stumbled across the Bogosort sorting algorithm. The example implementations looked horrible so I tried to implement it in a short and readable way, in Ruby of course. Here is my first and only attempt of a Ruby Bogosort. # Use: ruby bogosort.rb a b c def sorted for i in (0..$array.length-2) return false […]