Glossary term

What is path compression? Meaning for developers

During find, point every element on the path straight at the root, so later finds are short.

Learn it properly · DSALesson 53: Union-FindGroup things fast: connected groups, finding cycles and minimum spanning trees.

All DSA terms

Related terms

← All glossary terms, A to Z