This implementation uses sparse table to find Minimum in a given range.

This code uses Sparse Table to simplify querying minimum value in a given range over and over again. Running time complexity of this method is <O(Nlog(N)),O(1)>, which means that preprocessing step has O(Nlog(N)) time complexity, whereas further queries for minimum value over that range can be carried out in constant time.