本关任务:编写 listLength 函数来求线性表的长度。
#include "linearList.h"
int listLength(node * h)
{
int len = 0;
while(h)len++, h = h->next;
return len;
}
本关任务:编写 listLength 函数来求线性表的长度。
#include "linearList.h"
int listLength(node * h)
{
int len = 0;
while(h)len++, h = h->next;
return len;
}