Range Minimum Queries (RMQ)

Algorithm Algorithm Gist Time Complexity
Range minimum queries using sparse table Create a sparse table in O(n log(n) time. Queries in O(1) time. O(n log(n))