test case 2 is giving run error kindly figure out the error
Linked list k append
hey @Mehakgarg, you forgot to add return when head==NULL. Also you should add condition when k%w==0. I have made these changes to your code and indicate them as comment, you can check them here https://ide.codingblocks.com/s/117016
Your logic for append is correct.
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.