sparse table vs segment tree