数据结构C语言版人民邮电出版社第二章算法设计题第九题。与结点前的元素交换
#include<stdio.h>
#include<stdlib.h>
struct node{
int data;
struct node* prior;
struct node* next;
};
//尾插法创建双循环链表
struct node* creatbyrear()
{
struct node* head=(struct node*)malloc(sizeof(struct node));//创建头结点,也是返回值
head->next = head->prior =head; //初始化为空链表
struct node* newnode;