数据结构试验代码
小小菜鸡写代码?可笑可笑
circletime
这个作者很懒,什么都没留下…
展开
-
数据结构实验二 :Joseph环
#include <iostream> using namespace std; typedef struct lnode { int data; struct lnode* nxt; }lnode, * linklist; linklist l, k; void creat(linklist& l) { l = new lnode; l->nxt = NULL; } void init(linklist& l, int n) { linklist r =原创 2021-05-12 13:29:04 · 163 阅读 · 0 评论 -
面向对象第二 \ 三次实验
#include <iostream> using namespace std; typedef struct lnode { int data; struct lnode* nxt; }lnode, * linklist; class list { public: list(); ~list(); list(const list& li); void init(int n); bool insert(int index, int elem); bool Delete原创 2021-05-12 11:57:14 · 67 阅读 · 0 评论 -
顺序表
#include <bits/stdc++.h> #include <Windows.h> using namespace std; const int maxsize = 1e4 + 10; //建立学生信息的结构体 struct Student { string name; int ID; int score; }s; //重载结构体的是否等于判断 bool operator==(Student a, Student b) { if (a.ID == b.ID &a原创 2021-04-23 21:33:11 · 71 阅读 · 0 评论