Which of the operations among union, intersection, membership, cardinality will be the slowest in Linked List?

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? (GATE CS 2004)
(A) union only
(B) intersection, membership
(C) membership, cardinality
(D) union, intersection

What is cardinality in linked list???

2Comments
Abhishek @abhisinu
29 Apr 2017 01:03 pm

and what is membership in linked list??

shweta @shweta1920
29 Apr 2017 08:27 pm

definition of the set membership symbol. The symbol ∈ indicates set membershipand means “is an element of” so that the statement x∈A means that x is an element of the set A. In other words, x is one of the objects in the collection of (possibly many) objects in the set A.

  1. so for intersection once  go through all nodes of L1  and then of L2 and then serach for elements of both L1 and L2 in common  b/w two linked lists   print those 
  2. for union same process as intersection BUT ,.. print all elements of L1 then those elemnts of L2 which were not in L1
  3. CARDIANALITY is simple :count all nodes 
  4. membership .. as above definition... traverse all nodes of L1 and L2 and look for a match 

final answer is D