3 ms·
This is the shortest solution somebody has come up with, 79 characters. function(a,b,c,d,e){for(e=0;d<c;)with(a[d][b[e]||"B"])b[e]=w,e+=m,d=n;return b} Source
by Swizec 15y ago
This is the shortest solution somebody has come up with, 79 characters.
function(a,b,c,d,e){for(e=0;d<c;)with(a[d][b[e]||"B"])b[e]=w,e+=m,d=n;return b}
Source: https://gist.github.com/1400509 https://gist.github.com/1400509