hey please look at my code why i am not able to pass test case 3 what is wrong in this ??
Kth Node from the End
void kelement(Node *&head, int k){
Node *temp = head;
Node *fast=head;
Node *slow =head;
for(int i=1;i<=k;i++){
fast =fast->next;
}
while(fast !=NULL){
fast=fast->next;
slow=slow->next;
}
// slow=slow->next;
cout<<slow->data;
}
sorry i did not get the < > and why have you taken this amp
