typedef struct
{
int elem[max];
int length;
}Seqlist;
int Length(Linklist &L)
{
int count=0;
Linklist*p=L.next;
while(p){count++;p=p->next;};
return count;
}
2.14-实现Length(L)返回链表L的长度
最新推荐文章于 2024-01-20 17:44:52 发布
typedef struct
{
int elem[max];
int length;
}Seqlist;
int Length(Linklist &L)
{
int count=0;
Linklist*p=L.next;
while(p){count++;p=p->next;};
return count;
}