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.

Expert's answer

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);
}
LATEST TUTORIALS
APPROVED BY CLIENTS