Two Sigma Interview Question

Based on Binary Search, Graphs and arrays