Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue