Linked list k append

why it is not printing the last element

hello @nishiumrao

a) image
next should not be present there

b)image
next should be there.
also remove line 34.

check ur code->


handle one case where k > len