Partial Integers
Explore the implementation of partial integer data structures using BinaryTrie, XFastTrie, and YFastTrie. Understand how these structures optimize integer storage and retrieval, perform common set operations, and improve performance by leveraging bitwise paths, hashing, and sampling techniques in Java.
Bits as part of integers
In this module, we return to the problem of implementing an SSet. The
difference now is that we assume the elements stored in the SSet are -bit integers. That is, we want to implement add(x), remove(x), and find(x) where . It is not too hard to think of plenty of applications where the data—or at least the key that we use for sorting the data—is an integer.
We’ll discuss three data structures, each building on the ideas of the previous. The first structure, the BinaryTrie performs all three SSet
operations in time. This is not very impressive, since any subset of has size ...