rem’s avatarrem’s Twitter Archive—№ 77,426

  1. This puzzle has been doing my head in for a good while. result = [0,1,4,5,2,3,6,7,8,9,12,13,10,11,14,15...] [0,1,2,3,4,5,6,7,8,9,10...].map(???) == result From what I can tell, it's a matrix transform, but just can't get the algo right in my head (or in code). Any ideas?