Coviam interview question

Sort a given binary array in single pass