Question d’entretien chez Microsoft

It was hard leeetcode Binary Search problem