Wavelet Trees for Competitive Programming

Robinson CASTRO, Nico LEHMANN, Jorge Eduardo Pérez Pérez, Bernardo SUBERCASEAUX · OLYMPIADS IN INFORMATICS · 2016

The wavelet tree is a data structure to succinctly represent sequences of elements over a fixed but potentially large alphabet.It is a very versatile data structure which exhibits interesting properties even when its compression capabilities are not considered, efficiently supporting several queries.Although the wavelet tree was proposed more than a decade ago, it has not yet been widely used by the competitive programming community.This paper tries to fill the gap by showing how this data structure can be used in classical competitive programming problems, discussing some implementation details, and presenting a performance analysis focused in a competitive programming setting.

Read the paper · More papers on PaperTik