Sha256: edf336cdba93fd050236a50c2eb8740a9597e60e0950540466d9b4ebae1ac52e
Contents?: true
Size: 273 Bytes
Versions: 396
Compression:
Stored size: 273 Bytes
Contents
return function(n) local rows = { { 1 } } for i = 1, n - 1 do local row = {} for j = 1, i + 1 do row[j] = (rows[i][j - 1] or 0) + (rows[i][j] or 0) end table.insert(rows, row) end return { rows = rows, last_row = rows[#rows] } end
Version data entries
396 entries across 396 versions & 1 rubygems