Is this a correct logic?

node* findknode(node *head , int key)
{
node *slow = head;
node *fast = head;
while(i <= k)
{
fast = fast -> next;
i++;
}
while(fast != NULL)
{
slow = slow -> next;
fast = fast -> next;
}
return slow;
}

@dhruvtrehan45 hey,yes this logic is absolutely correct.