12.07.2015 Views

Heap sort and complexity, Disjoint Union & Find, Complexity ...

Heap sort and complexity, Disjoint Union & Find, Complexity ...

Heap sort and complexity, Disjoint Union & Find, Complexity ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

procedure FIND(i);var j:integer;beginj:= i;while( PARENT(j) > 0) doj := PARENT(j);k := i;while (k j) dot := PARENT(k);PARENT(k) := j;k := t;return(j);end.Chapter 2: Elementary Data Structures

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

Saved successfully!

Ooh no, something went wrong!