I wonder if there\'s a possibility to create a two dimensional array and to quickly access any horizontal or vertical sub array in it?
I believe we can access a hor
a = Array.new(Array.new(4)) 0.upto(a.length-1) do |i| 0.upto(a.length-1) do |j| a[i[j]] = 1 end end 0.upto(a.length-1) do |i| 0.upto(a.length-1) do |j| print a[i[j]] = 1 #It's not a[i][j], but a[i[j]] end puts "\n" end