Path compression technique

Home > Computer Science > Algorithms and data structures > Disjoint Set Union > Path compression technique

This is a technique used to optimize the time complexity of find operation in Union-Find algorithm. It involves flattening the path from a node to its root by making all the nodes along the path directly point to the root node.