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
Priority Queue (Heap)
A priority queue returns the highest-priority element first and is efficiently implemented by a binary heap.
#priority queue#binary heap#min-heap+11