Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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: 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
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