one-pass solution to sortColors