Sorting an array of 0s 1s and 2s