Suppose each set is represented as a linked list with elements in arbitrary…

GATE · 2004 · CS

Suppose each set is represented as a linked list with elements in arbitrary order. Which of the operations among union, intersection, membership, cardinality will be the slowest?

  1. A.

    union only

  2. B.

    intersection, membership

  3. C.

    membership, cardinality

  4. D.

    union, intersection

Attempted by 547 students.

Show answer

Correct answer: D

The worked solution is available to enrolled students.

Video solution available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…