Construction of Fundamental Data Structures for Strings