> For the complete documentation index, see [llms.txt](https://blog.sunilgudivada.dev/notebook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.sunilgudivada.dev/notebook/data-structures-and-algorithms/topics/union-find-data-structure/defects.md).

# Defects

### **Quick-find defect**

* Union too expensive (N array accesses).
* Trees are flat, but too expensive to keep them flat.

### Quick-union defect

* Trees can get tall.
* Find too expensive (could be N array accesses)
