use 2 pointers to scan forward once to sort colors