Linked list K append issue

2/4 test cases not working
link to code- https://ide.codingblocks.com/s/91236

hey @Ankit05, you have not consider the cases when k>=N and k<=0. I have made some changes on your code you can check them here https://ide.codingblocks.com/s/91272

okay thanks
NOw the answer is submitted

hey @Ankit05 , if your query is resolved. Please mark this doubt as resolved and rate me on the basis of your experience.
rating option will appear when to mark this doubt as resolved