Coviam Interview Question

Sort a given binary array in single pass