Output problem in linked list

why this is not giving the correct ouptut .it print the 1st element 2 times

Hey @dreamerekta
Add a return statement in check case of insertionattail() function where you are checking if head==null or not otherwise 1st node is getting added twice.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.