08.06.2015 Views

A Simple and Efficient Union-Find-Delete Algorithm - Corelab

A Simple and Efficient Union-Find-Delete Algorithm - Corelab

A Simple and Efficient Union-Find-Delete Algorithm - Corelab

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Implementing <strong>Union</strong><br />

One of the trees is of size < 4 :<br />

Hang all its nodes on the other root<br />

T B<br />

0<br />

7<br />

T A<br />

5<br />

3<br />

1<br />

6<br />

9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!