Niantic interview question

Something similar to Range Minimum Query.