题目要求:
源代码:
#include <stdio.h>
#include <stdlib.h>
typedef struct _DoubleLink
{
int data;
struct _DoubleLink *prior;
struct _DoubleLink *next;
int length;
} DoubleLink, *pDoubleLink;
void Create(pDoubleLink L, int n);
void Doubleout(pDoubleLink L);
void Destroy(pDoubleLink L);
int Insert(pDoubleLink L, int data, int pos);
int main(void)
{
int n, data, pos, flag;
pDoubleLink L = (pDoubleLink)malloc(sizeof(DoubleLink)); //头结点
L->prior = L->next = NULL;
L->length = 0;