Oh, it's been a while since I've had bandwidth to participate. Today's was nice & relaxing, though. Just what I need before a flight.
Here's mine:
const split = arr => [arr.slice(0, arr.length / 2), arr.slice(arr.length / 2)]; const interleave = (a, b) => a.reduce((shuffled, aIdx, idx) => (shuffled.push(aIdx, b[idx]), shuffled), []); const faro = arr => interleave(...split(arr));
Full version w/ tests at gist.github.com/kerrishotts/bde389...
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Oh, it's been a while since I've had bandwidth to participate. Today's was nice & relaxing, though. Just what I need before a flight.
Here's mine:
Full version w/ tests at gist.github.com/kerrishotts/bde389...