Bitsset
Bitsset is a data structure used to store a set of boolean flags in a compact, fixed-length sequence of bits. Each position in a bitsset corresponds to an element in a predefined universal set, and the bit value indicates membership or state. Because the size is fixed at creation, bitsets are memory-efficient for representing large universes of elements.
Internally, a bitsset is typically implemented as an array of machine words (such as 8, 16, 32,
Common operations include: set(index) to turn a bit on, reset(index) to turn it off, test(index) to check
Bitssets appear in various forms across programming languages. Fixed-size variants resemble C++’s bitset, while dynamic variants
See also: bit array, bit mask, bloom filter, bitwise operations.