Skip to content

Instantly share code, notes, and snippets.

@killy971
Created September 23, 2009 07:40
80.times do |i|
80.times do |j|
x = (i > 0 ? m[i - 1][j] : nil)
y = (j > 0 ? m[i][j - 1] : nil)
x ||= y ||= 0
y ||= x ||= 0
m[i][j] += x < y ? x : y
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment