Concepts2
βοΈAlgorithmIntermediate
Small-to-Large Principle
Small-to-large means always merge the smaller container into the larger one to keep total work low.
#small-to-large#sack technique#dsu on tree+11
ποΈ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