Runtime of union find is slightly worse than O(N). https://www2.eecs.berkeley.edu/Pubs/TechRpts/1974/28764.html
Sure, but as far as "slightly" goes, it's pretty good!