Concepts2
⚙️AlgorithmIntermediate
MST Properties and Applications
An MST minimizes total edge weight over all spanning trees and has powerful properties such as the cut and cycle properties that guide correct, greedy construction.
#minimum spanning tree#kruskal#prim+12
🗂️Data StructureAdvanced
Heavy-Light Decomposition
Heavy-Light Decomposition (HLD) breaks a tree into O(n) disjoint chains so that any root-to-node path crosses only O(log n) chains.
#heavy light decomposition#hld c++#segment tree on tree+10