Heap sort and complexity, Disjoint Union & Find, Complexity ...
Heap sort and complexity, Disjoint Union & Find, Complexity ...
Heap sort and complexity, Disjoint Union & Find, Complexity ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
procedure F(i);var i,j : integer;beginj:=i;While (parent(j) > 0) doj := parent(j)return(j)end.Chapter 2: Elementary Data Structuresperformance of U <strong>and</strong> F is not good, for ex. S i = {i}, 1 ≤ i ≤ n,then there is forest of n nodes with parent(i) = 0, 1 ≤ i ≤ n.