int count ( ListNode * Ha,ElemType x )
{ // Ha为不带头结点的单链表的头指针
int n = 0; ListNode *p;
p=Ha;
while ( p->link != NULL ) {
if ( p->data == x ) n++;
p = p->link;
}
return n;
}
int count ( ListNode * Ha,ElemType x )
{ // Ha为不带头结点的单链表的头指针
int n = 0; ListNode *p;
p=Ha;
while ( p->link != NULL ) {
if ( p->data == x ) n++;
p = p->link;
}
return n;
}