sparse table for max/min range queries