Amazon Interview Question

Sliding Window, Binary Search on Answer