You are viewing a single comment's thread. Return to all comments →
Look at the code carefully Mr.Suraj kumar,I have simply traversed the list..
int GetNode(Node *head,int positionFromTail)
{
int index=0; struct Node *temp=head,*result=head; while(temp!=NULL){ temp=temp->next; if(index++ > positionFromTail) result=result->next; } return result->data;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Get Node Value
You are viewing a single comment's thread. Return to all comments →
Look at the code carefully Mr.Suraj kumar,I have simply traversed the list..
int GetNode(Node *head,int positionFromTail)
{
}