
数据结构
lillte_bird
这个作者很懒,什么都没留下…
展开
-
双链表
#include<bits/stdc++.h> using namespace std; typedef struct DNode{ struct DNode *prior, *next;//不可写成struct DNode *prior, next; *要和变量一起 int data; }*DLinklist,DNode; void Print(DLinklist L){ DNode* r = L; while(r->next !=NULL){ r = r-&g.原创 2020-08-17 09:34:46 · 110 阅读 · 0 评论 -
单链表代码
#include<bits/stdc++.h> using namespace std; typedef struct Node{ int data; struct Node* next; }*Linklist,Node; int length;//表长 void PrintList(Linklist L){//输出链表 while(L->next != NULL){ cout << L->next->data << " "...原创 2020-08-16 20:19:27 · 180 阅读 · 0 评论