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

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

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

Chapter 2: Elementary Data StructuresAdvantages: It can be easily determined whether or notparticular element i is present. <strong>Union</strong> <strong>and</strong> Intersection can bedone using “logical <strong>and</strong>” <strong>and</strong> “logical or”.Disadvantages: This representation is inefficient when thevalue of n is large (say larger than the number of bits in theword) <strong>and</strong> the size of the set is smaller compare to U. The timewill be proportional to n rather than the number of elements inthe set.

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

Saved successfully!

Ooh no, something went wrong!