Continental interview question

Sort array in ascending order, toggle bit