You are viewing a single comment's thread. Return to all comments →
This is my solution in C++14
Node* Insert(Node *head,int data) { Node *temp = new Node(); temp->data = data; temp->next = NULL; if(head==NULL) { head = temp; } else if(head->next==NULL) { head->next = temp; return head; } else { Insert(head->next,data); } return head; }
Seems like cookies are disabled on this browser, please enable them to open this website
Insert a Node at the Tail of a Linked List
You are viewing a single comment's thread. Return to all comments →
This is my solution in C++14