//this is the recursive solution
//initial call
find(HEAD,k);
// main function
void find(struct link *temp,int k)
{
if( temp->next != NULL)
find( temp->next, k);
if((c++) == k) // c is initially declared as 1 and k is the node to find from last.
cout<num<<' ';
}