Question says k can be greater than n. But how can there be last k elements in a list of n elements if k>n? This is weird.
How K greater than n?
Hi @rishabhsetiya7,see if the size of linked list is 5,then k=7 so 5 times first you will append the items to the front of the list then appending 5 times you will get the same list then you will append 2 more elements.So basically you appended the list 2 times.