Answer to Question #310964 in C++ for Shah jee

Question #310964

let a and b are two linked list.write a c++ function to create a new linked list c that contains alternately from a and b beginning with first element of A.if you run out of element in one element of the list,then append the remaining elements of the other elements of c.

1
Expert's answer
2022-03-13T15:11:27-0400

Here is program:

void Create(list <int> a, list <int> b)
{
	a = b;
	list<int> c = a;
}
int main()
{
	list <int> a;
	list <int> b; 
	Create(a,b);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment