Why 2 test cases failing?
2 test cases failing ()
Your code will not work in test cases, where k>n, so in that case, use the following conditions :
k=k%N;
if(k==0)
{
print(head);
}
else
{
head=append_nodes(head,k);
print(head);
}
Why 2 test cases failing?
Your code will not work in test cases, where k>n, so in that case, use the following conditions :
k=k%N;
if(k==0)
{
print(head);
}
else
{
head=append_nodes(head,k);
print(head);
}