Bloomberg Interview Question

Don't remeber the first problem but second was on 2D binary search