7.1 Sets, Relations, Functions
Basic set theoretic language, including sets, membership, subsets, operations, relations, equivalence relations, order relations, and functions.
7 notes
Basic set theoretic language, including sets, membership, subsets, operations, relations, equivalence relations, order relations, and functions.
Combine elements from two arrays into one collection without duplicates.
Compute the common elements between two arrays.
Remove duplicate values from an array while keeping one representative of each value.
Select k distinct integers uniformly from a fixed range without shuffling the whole range.
Implement a hash-based set for fast membership testing, insertion, and deletion without associated values.
Hash tables, hash functions, collision handling, probabilistic structures, and practical design for constant-time key-value access.