Question: C++ Name: 3. (30 points) Given two heads of linked lists: head and head2. merge two putting second linked list after the end of the

 C++ Name: 3. (30 points) Given two heads of linked lists:
C++

Name: 3. (30 points) Given two heads of linked lists: head and head2. merge two putting second linked list after the end of the first linked list and return the head of linked list. Note that head and/or head2 can be NULL Example 1: headi: 1-3->5->NULL, head2: 2->11->7->0-> NULL Result: 1->3->5->2->11->7->0->NULL, you return the head of Result Example 2: headi: NULL, head2: 9-54-MULL. Result: 9->->NULL return head of Result The following is definition of node type: class node publier noe next hodetit, mode value- next - pi ULL) node" merge (node "head, node* head2)

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!