ElementType FindKth( List L, int K )
{
List l;
int count=0;
for(l=L;l!=NULL;l=l->Next)
{
count++;
if (count==K)
return l->Data;
}
return -1;
}
ElementType FindKth( List L, int K )
{
List l;
int count=0;
for(l=L;l!=NULL;l=l->Next)
{
count++;
if (count==K)
return l->Data;
}
return -1;
}