链表封装,增删减查函数集合
1.创建链表函数
void *head_celebrate(int n, int a[])
{
node *head, *p, *q;
p = (node *)malloc(sizeof(node));
p->val = n;
head = p;
head->next = NULL;
for (int i = 0; i < n; i++)
{
q = (node *)malloc(sizeof(node));