The output of my code only print first element. Please tell me what is wrong in it.
Linked list Doubts
- In print function, you don’t need to pass by referrence.
- In Insert at tail function, you need to attach the new node at tail’s next(i.e. tail->next=new node(data))
Kudos… happy coding !!