Niantic Interview Question

Something similar to Range Minimum Query.