Microsoft interview question

sort an array with 3 colors