Motional Interview Question

Solving a binary sorting problem in C++