数据结构与算法
大一下
智能打工人
这个作者很懒,什么都没留下…
展开
-
ACM笔记
学校ACM课笔记原创 2022-06-27 22:41:46 · 188 阅读 · 3 评论 -
【数据结构与算法】结构体、链——开放哈希法,链地址法
结构体、链——开放哈希法,链地址法原创 2022-06-22 23:10:46 · 74 阅读 · 0 评论 -
【听说有人想转码】(部分)链栈
随意写了一点,供以后取用。#include <iostream>using namespace std;template <typename t> class lian;template <typename t> class knot{ friend class lian<t>;private: t value; knot<t>* next;public: knot(t a=0) { value = a; next = N原创 2022-04-16 12:14:02 · 268 阅读 · 0 评论 -
【听说有人想转码】链表初探
唠嗑大一上没有具体讲链表,只听说过,昨天又听老师提到,说是个存数据和后续地址的玩意。很有意思的样子,就试了一下,没看过样例,可能我自己写的四不像。上代码#include <iostream>using namespace std;int main(){ struct link { double scores; struct link* next; }stu; int i = 0,p=1; struct link* loc = &stu; for原创 2022-03-03 21:48:51 · 601 阅读 · 0 评论 -
【听说有人想转码】线性表
先写类(模板内容复习)#include <iostream>using namespace std;template <class elem> class list{public: virtual bool insert(elem x) = 0; virtual bool append(elem x) = 0; virtual bool remove(elem& x) = 0; virtual void prev() = 0; virtual voi原创 2022-03-20 11:01:29 · 233 阅读 · 0 评论 -
【听说有人想转码】线性表的使用(数组)
要用到mallocfree头文件#include <malloc.h>#include <iostream>#include <malloc.h>using namespace std;typedef struct link* list;struct link{ int a[20]; int last;};list make(){ list p; p = (list)malloc(sizeof(struc.原创 2022-03-13 16:44:12 · 61 阅读 · 0 评论