Question
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
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 *head1, Node *head2) that takes the two lists (i.e. course1 and course2) as argument and returns a single list
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started