#bitset
Wiki
›
Algorithms
›
02. Data Structures
›
1. Core Data Structures and Operations
›
1.1 Arrays and Dynamic Arrays
›
Bit-Packed Array
Bit-Packed Array A bit-packed array stores values using a fixed number of bits per element. Instead of allocating a full machine word for each entry, it packs multiple elements into a single word. You use it when values have small ranges and memory footprint matters. Problem Given an array $A$ of length $n$ where each value fits in $b$ bits, support: read element at index $i$ write element at index...