一.链表初始配置:
#include <iostream>
using namespace std;
struct NODE{
int data;
NODE * next;
};
class List{
NODE
* head;public: //若构造函数里为head = NULL;
* 则表示不带头结点的链表,只有头指针
* List()
* {
* head = new NODE;
* head->next = NULL;
* }
* //建立带头结点的链表,head->next = NULL;
* 表示链表为空,只有一个头结点
* void CreatList1(int n); //头插入法创建链表
* void CreatList2(int n); //尾插入法创建链表
* void Insert(int i, int e); //按位置插入元素:在i位置处插入元素为e的节点
* void InserList(int aData, int bData); //按节点插入节点:在节点a之前插入节点b
* void Delete