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.
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);
}
Comments
Leave a comment