[PTA] 数据结构与算法题目集 6-3 求链式表的表长

Length( List L ){
    int res=0;
    while(L!=NULL){
        res++;
        L=L->Next;
    }
    return res;
}

posted @ 2018-11-17 22:54  Ruohua3kou  阅读(353)  评论(0编辑  收藏  举报