Genesys Interview Question

They asked me to sort the array which contains 0s 1s and 2s