Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -1,11 +1,11 @@
class Array
def beadsort
map {|e| [1] * e}.columns.columns.map {|e| e.length}
map {|e| [1] * e}.columns.columns.map(&:length)
end
def columns
y = length
x = map {|l| l.length}.max
x = map(&:length).max
Array.new(x) do |row|
Array.new(y) { |column| self[column][row] }.compact # Remove nils.
end