TLE Error kth node from end

Not able to understand why test cases are failing.My code:

hello @Vishal_234
improve your addnode function it is taking O(n) for each node.
u can improve it storing tail of ur linked list.
if u will have tail then u can simply add node in o(1) by this.
tail->next=new node
tail=tail->next;

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.