Question: its data struucture and alogarithmc++ question . kindly solve fast. thanks Q1. (10 marks) A professor is taking two courses in this semester. Some students

its data struucture and alogarithmc++ question . kindly solve fast. thanks Q1.its data struucture and alogarithmc++ question . kindly solve fast. thanks

Q1. (10 marks) A professor is taking two courses in this semester. Some students are enrolled in one of his courses while some are enrolled in both. To maintain the data of his students, he creates a program using linked lists. He maintains a list for each course containing the names of the students enrolled in that course. Now he wants to check which students are attending both of his courses. Considering the given ADTs, use only the attributes and member functions outlined to create a non-member C++ function Node* common(Node *headl, Node *head2) that takes the two lists (i.e. coursel and course2) as argument and returns a single list Node Class ADT Linked List Class ADT class Node class List { { public: public: string name; Node *head; Node *next; List(); }; bool isEmpty(); void insert_beg(string); void insert_end (string); void traverse(); }; of students common in both courses. [10] NOTE : You have freedom to use any logics using material studied in this course only

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!