wavelettree
Wavelettree is a data structure used to represent a sequence over a finite alphabet in a compact form while supporting efficient queries. The term is commonly used in literature to refer to the wavelet tree, and some texts spell it as wavelettree. The wavelet tree enables operations such as access, rank, and select on the sequence, as well as various range queries.
Construction and design: The wavelet tree is a balanced rooted tree. The root corresponds to the whole
Operations: Access(i) returns the symbol at position i by following the path from root to leaf, guiding
Space and complexity: Memory usage is roughly n log2(sigma) bits plus overhead for the bitvectors. Time for