Groups
Category
A wavelet tree is a recursive data structure built over a sequenceโs alphabet that answers rank, select, and quantile (k-th smallest) queries in O(log ฯ) time, where ฯ is the number of distinct values.
A persistent segment tree stores every historical version of an array-like data while supporting queries and updates in O(log n) time.