#include<stdio.h>
#include<stdlib.h>
typedef int elemtype;
typedef struct DLNode
{
elemtype data;
struct DLNode* next, * front;
}DLNode, * DListlink;
DLNode* Creatlist1(DListlink& L, int n)
{
L = (DLNode*)malloc(sizeof(DLNode));
DLNode* r = L;
int x;
int i = 0;
DLNode* q;
printf("请输入你要插入的数:\n");
while (i < n)
{
q = (DLNode*)malloc(sizeof(DLNode));
scanf_s("%d", &x);
q->data = x;
r->next = q;
q->front = r;
r = q;
i++;
}
r->next = L;
L->front = r;
return L;
}
DLNode* Creatlist2(DListlink& L, int n)
{
L = (DLNode*)malloc(sizeof(DLNode));
09-27