i tried it using the hint video approach , but getting only 2 test cases correct and rest TLE kindly tell the mistake.
Linked List K append
Sir the logic of my code is also the same but the syntax is a bit different from yours , it would be very helpful if you could tell me the mistake in my code , i got 3 test cases right out of 6 .
k = k%n;
u just have to add this line to ur code… ur code will pass all test cases…
corrected code -->
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.
Thank you sir for the help , we did k=k%n so that if k is larger than n we could append n-k elements only ?