Concepts3
βοΈAlgorithmIntermediate
XOR Hashing (Zobrist Hashing)
XOR (Zobrist) hashing assigns a random 64-bit number to each possible element and hashes a set by XORing the numbers of present elements.
#xor hashing#zobrist hashing#incremental hashing+11
βοΈAlgorithmIntermediate
Randomized Algorithms
Randomized algorithms use coin flips (random bits) to guide choices, often making code simpler and fast on average.
#randomized algorithms#las vegas#monte carlo+12
ποΈData StructureIntermediate
Hash Table
A hash table stores keyβvalue pairs and finds items in expected O(1) time using a hash function to map keys to buckets.
#hash table#unordered_map#unordered_set+12