#pragma comment(linker, "/STACK:10240000,10240000")
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <map>
#include <set>
#include <vector>
#include <stack>
#include <queue>
#include <cstdlib>
using namespace std;
#define ll long long
const double pi = acos(-1.0);
const int mod = 1e9 + 7;
#define N 110
typedef struct node
{
int data;
struct node *next;
}LinkList;
LinkList * p;
void creat(LinkList * &L, int n) //建立带头节点的链表//每次在头结点的后面一位插入
//比如输入 2 3 4 5 6,链表对应的是:头-6-5-4-3-2-尾
{
L = (LinkList *)malloc(sizeof(node));
L->next =
用指针实现链表的创建及部分功能
最新推荐文章于 2023-04-28 11:33:59 发布