Two Sigma interview question

Based on Binary Search, Graphs and arrays