Let's do it: [0, 1, 0, 1, 0] 010 phase done: [0, 1, 0, 1, 0] tmpstr 101 i 0 tmpstr 010 (-010) Now: [0, 1, 1] Finishing up: [0, 1, 1] 5 2 1 1 1 1