private static int log2(int n){
        if(n <= 0) throw new IllegalArgumentException();
        return 31 - Integer.numberOfLeadingZeros(n);
    }
Date 04/28/2016
@author Tushar Roy

Find range minimum query using sparse table.

Preprocessing Time complexity O(nlogn)
Query Time complexity O(1)
Space complexity O(nlogn)

Reference -
https://www.topcoder.com/community/data-science/data-science-tutorials/range-minimum-query-and-lowest-common-ancestor/
src/com/interview/misc/SparseTableRangeMinimumQuery.java