Cycle leader algorithm to move all even positioned elements at the end .
function cycleLeader ( shift , len ) { let j ; let item ; for ( let i = 1 ; i < len ; i *= 3 ) { j = i ; item = str [ j + shift ] ; do {