Let's do it: [1, 1, 0, 1, 1] 010 phase done: [1, 1, 0, 1, 1] tmpstr 101 i 0 tmpstr 011 (-011) Now: [1, 1, 1] 4 3 1 1 1