Given an array, answer queries: what are the smallest values in range ? Sparse table for min gives only the smallest. For top-, you need more storage.
Approach: at each , store the smallest values in that range. Merge by combining two sorted lists and keeping the smallest . Space: .
Build: . Query: . This works when is small and fixed. For variable , consider other structures like wavelet trees.