鏈表的查找

題目: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
相關文章
相關標籤/搜索