这里采用双向链表实现
#include<iostream>
using namespace std;
struct Node {
int val;
Node*next;
Node*pre;
};
void Print(Node*head) {
Node*p = head->next;
这里采用双向链表实现
#include<iostream>
using namespace std;
struct Node {
int val;
Node*next;
Node*pre;
};
void Print(Node*head) {
Node*p = head->next;