Find the missing permutation: Difference between revisions

Line 1,166:
return transpose(xs.split(' ')
.map(x => x.split('')))
.map(col => col.reduce((a, x) => ( // count of each character in each column
a[x] = (a[x] || 0) + 1,
a
9,659

edits