Doubt in output

why in the output the list not starts with

0 -> 1 -> …

Hellio @prerak_semwal, set data = -1, instead of null. As computer reads null as 0 so it will not print 0 in the linked list. Moreover, you also need to remove your input/output file part so that it can print its output on the ide output console.
I hope it will be clear to you. Pls, feel free to ask if you have any other doubts.
Pls, you can also refer the code:


Thanks :slight_smile: