1. Engineering
  2. Computer Science
  3. create a function that combines two lists into one for...

Question: create a function that combines two lists into one for...

Question details

Create a function that combines two lists into one. For example, if list A consists of 1, 2, 3, 4 and list B consists of 5, 6, 7, 8; after calling the function, list A should consists of 1, 2, 3, 4, 5, 6, 7, 8 and list B should contain nothing.

Use the following incomplete function definition.

void combine(Node* &head1, Node* &head2) { 
    // . . .
}
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution