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