sortColors by one pass