Microsoft interview question

1d-DP, implementing binary search and graph algorithms