Wavelet tree with RRR structure