GlobalLogic interview question

Dsa questions binary sort js