Project 1 - Creation of user defined data type to implement the user interfaces for working with ‘Set’ (Mathematical Set theory) using Linked List
UNION AND INTERSECTION OF TWO LINKED LIST
IDEA
Create two linked list
Let the two input linked list be LLone and LLtwo.
unionLL and intersectionLL are the union linkedlist and intersection linked list.
UNION
Initialize unionLL with NULL.
Traverse LLone and add all nodes to unionLL.
Traverse LLtwo and check if a node of LLtwo is already present in unionLL.
INTERSECTION
Initialise intersectionLL with NULL.
Traverse LLone and search each node of LLone in LLtwo .
If found then add it to intersectionLL otherwise continue.
PROGRAM





OUTPUT
