What is the need of given size 5 why we are taking input the size we dont have any use of it

what is the need of given size 5 why we are taking input the size we dont have any use of it

@Aditya-Kushwaha-914550392281281 5 is the number of nodes in the linked list.

Then how will you know when to stop taking input for the linked list?

The input format is:

n 
n space-separated integers 

@Aditya-Kushwaha-914550392281281 please mark the doubt as resolved in case you dont have any further queries.

https://ide.codingblocks.com/s/257351 plzz comment the error in it mam

@Aditya-Kushwaha-914550392281281 which problem is this code for?

it is for k append output . it is giving wrong output

hi @Aditya-Kushwaha-914550392281281 you have not updated the actual head of the list, this is why only half the list is being printed, I have corrected your code here https://ide.codingblocks.com/s/257373 look at line 50.

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.