编程实现在带头结点的单链表中查找内容为x的节点,若找到,返回该点地址;否则返回NULL。(包指数据结构的定义)
struct node{Datatype data;struct node *next;};struct node *find(struct node*head,datatype x){ struct node *p=head->next;While(p!null&&p->data!=x)P=p-next;If(p->data==x)Return p;}
扫描二维码免费使用微信小程序搜题/刷题/查看解析。
版权声明:本文由翰林刷题小程序授权发布,如需转载请注明出处。