链表的查找

题目:https://pintia.cn/problem-sets/15/problems/727 题目设定查找失败返回error 为-1 ElementType FindKth( List L, int K ){ int sum = 0; while(L!=NULL){ sum++; if(sum == K){ return L->Data; } L = L->Next; } return -1
相关文章
相关标签/搜索