You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FIND: WHAT IS THE ROOT OF P?
CONNECTED: DO P AND Q HAVE SAME ROOT
UNION
TO MERGE COMPONENTS CONTAINING P AND Q, SET THE ID OF P'S ROOT
TO THE ID OF Q'S ROOT.
defects
union too expensive
trees can get tall
#Lazy-Approach