这里是一种实现单链表插入、删除结点算法的C语言示例代码:
#include <stdio.h>
#include <stdlib.h>
struct node {
int data;
struct node *next;
};
struct node *create_list(int *arr, int n) {
struct node *head, *p;
for (int i = 0; i < n; i++) {
struct node *nd = (struct node *)malloc(sizeof(struct node