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