有两个双向链表,头指针为:pListA和pListB,要求删除这两个链表中值相同的结点, C语言实现,结点结构如下:
struct node // 双向链表结点
{
int key;
struct node *front, *next;
};
完整源代码如下:
/*
功能:删除两个双向链表(都不带头结点)中值(key)相同的结点
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct node // 双向链表结点
{
int key;
struct node *front, *next;
};
/*
功能: 创建双向链表
返回值:1-创建成功,0-创建失败
header: 创建的......
阅读全文