Algorithms and Data Structures for Next Generation Sequences