Microsoft interview question

Write code about binary search