for making 2 link list do we have to make to classes ??
Do i need to make 2 class
Yes Anubhav, you can create your class like this :
class node {
public :
int data;
node *next;
node(int d)
{
data = d;
next = NULL;
}
};
Then you can create a function insertAttail to insert the data at the end of linked list…