Linked List K append

Sir it is giving TLE
Pls review it

@Ramitcodingblocks
Instead of traversing list each time and adding element to end
Keep a tail pointer which points to the end
So every time a new node is added you can add it directly after the tail
Right now linked list creation is O(N^2)
It should be O(N)