fork(7) download
  1. # your code goes here
  2.  
  3. entryArray = [[1, 2, 3, 4], [12, 13, 14, 5], [11, 16, 15, 6], [10, 9, 8, 7]]
  4.  
  5. def f(a) a.empty? ? [] : a.shift+f(a.transpose.reverse) end
  6.  
  7. p f(entryArray)
Success #stdin #stdout 0s 28216KB
stdin
Standard input is empty
stdout
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]