Given an array A[] consisting of 0s, 1s, and 2s, write a function that sorts the array in place, putting all 0s first, then all 1s, and all 2s last.
You are practicing as a guest. Sign up free to get your answer graded with AI feedback. Your draft stays right here.