ABC interview question

Use binary search to find least path