Challenge

Project 1 - Creation of user defined data type to implement the user interfaces for working with ‘Set’ (Mathematical Set theory)

In this project, interfaces for mathematical Set Theory are implemented using C programming language. User can give the input like two list of data and this program will give the output as the union and intersection of these two lists

OUTPUT:

Goal (2 to 3 points)

  • Implementation of interface for mathematical Set Theory using C programming.

1.create a linked list1,linked list2,allocate the memory,assign the value of the node,then connected to the nodes,& print the value.

2.create the union linked list node , and compare with the linked list1 nodes & linked list2 nodes if pressed same value do not add a node.

3. create the intersection linked list ,and compare with the linked list1 nodes & linked list2 nodes both is common add a new node.

  • Giving two list of data as input to get the output as union & intersection for given list of data.

1. input of linked list1 data={1,2,3} & linked list2 data={3,4,5}.

2.output of a union is ={1,2,3,4,5}.

3.intersection output is ={3}.

Key Hightlights of the project:(4 to 5 point)

  • Creating two list of data using linked list method.

1.Create a two list of empty node & give the name of the node.

2.Declare the name of void printlinked list & newprintlinkedlist.

3.Then assign the variable name & create a pointer variable.

4.check the node is empty or not. print the data & connected to the next node

  • Insert the node to 1st and 2nd list accordingly.

1.Her use structure concept so use keyword of struct and given the node name(struct node ).

2.Insert the struct node for Head is connected to the first node,node1 having the two parts data and linked part,same as node2.

3.First node is linked to the second node.

4. First node is linked part is contain the second node data

  • Intersection of data of two lists.

1.intersction create the local variable and assign the variable is head3.

2.Allocate the memory for the intersection node.

3.Compare the two linked list of the values.

  • Getting Union of two list.

1.union linked list is created for three nodes,allocate the memory for three nodes.

2.Assign the union node to linked list and connected to the nodes

3.compare the two linked list and check values in equal or not

4.equal value writen to the console

Deliverables of this project:(4 to5 pointe)

  • Intersection of data of two list.

1.intersection of linked list data1 values={1,2,3}.

2.intersection of linked list data2 values={3,4,5}.

3.After compare the two linked list get the value is={3}

  • Union of data of two list

1.union of linked list data1 values={1,2,3}.

2.union of linked list data2 values={3,4,5}.

3.After compare the two union linked list get the vam=lue is={1,2,3,4,5}

Expected outcomes:(4 to 5 points)

  • Student will get the Knowledge of creating the nodes using Linked List.

1.linked list is a linear data structure contain a collection of elelement is node.

2.create the empty node use structure.

3.initialize the data and link part.

4.check the node in empty or not then print the value & link to the next node.

  • Getting the intersection and Union of data of two list.

1.create the intersection and union of linked list, declare the local variable,and assign the head for both of the list

2.both of allocate the memory,assign the value & linked to the nodes

3.head3 is assign for list1,head4 is assign for list2.

  • Comparing the elements of two list.

1.intersectionlinkedlist compare the linkedlist1==linked list2 for all the elements

(node1==node4 || node2==node4 || node3==node4),(node1==node5 || node2==node5 || node3==node5),

(node1==node6 || node2==node6 || node3==node6)

2.unionlinkedlist compare the linkedlist1!=linked list2 for all the element

(node1!=node4 && node2!=node4 && node3!=node4),(node1!=node5 && node2!=node5 && node3!=node5)

(node1!=node6 && node2!=node6 && node3!=node6)

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.