自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 二叉搜索树

#include <bits/stdc++.h>using namespace std;template<class T> class binaryTree { private: typedef struct treeNode { T val; struct treeNode *ls, *rs; } node; .

2022-05-27 12:01:45 69

原创 优先队列(二叉堆)

```#include <iostream>using namespace std;template<class T, const int MAX_SIZE> class priority_queue { private: T _node[MAX_SIZE]; int _idx = 1; /* * the ...

2022-05-27 11:56:29 65

原创 哈夫曼树 & 八皇后

文章目录哈夫曼树八皇后哈夫曼树这里使用优先队列(小根堆)进行构建,并且使用查探法在数组中寻找新建结点的位置。输入一个字符串, 输出它的哈夫曼编码#include <bits/stdc++.h>#define remilia int#define isMyWife mainusing namespace std;const int N = 10000;// 记录权值int times[30], n, index = 30;int val[N], ls[N], rs[

2022-05-26 23:58:56 88

原创 二叉树及其遍历

文章目录递归非递归递归void preOrder(int root) { if (!val[root]) { return; } cout << val[root] << " "; preOrder(ls[root]); preOrder(rs[root]);}void inOrder(int root) { if (!val[root]) { return; } inOrder(ls[root]); cout << val[r

2022-05-24 23:30:15 72

原创 矩阵乘法 & 二维数组 & 压缩矩阵

文章目录代码结果代码import kotlin.time.measureTime/** * */class Matrix() { /** * 矩阵的行的数量 * 不允许更改, 只能在初始化的时候设置 */ private var rows: Int = 0 /** * 矩阵列的数量 * 不允许更改, 只能在初始化的时候设置 */ private var columns: Int = 0 /*

2022-05-19 23:21:45 154

原创 数据结构 - 队列

文章目录老师代码接口定义数据定义链式队列循环队列队列是一种后进后出的结构老师代码循环#include <stdio.h>#include <malloc.h>#define TOTAL_SPACE 5/** * Circle int queue. */typedef struct CircleIntQueue{ int data[TOTAL_SPACE]; int head; int tail;}*CircleIntQueuePtr;/**

2022-05-17 22:49:18 269

原创 数据结构 - 栈与递归

"人理解迭代, 神理解递归"

2022-05-12 19:10:30 205

原创 栈和栈的应用

文章目录栈栈的应用括号匹配表达式求值栈栈是一个符合先进先出的结构, 首先呈上老师的代码#include <stdio.h>#include <malloc.h>#define STACK_MAX_SIZE 10/** * Linear stack of integers. The key is data. */typedef struct CharStack { int top; int data[STACK_MAX_SIZE]; //The

2022-05-10 22:45:24 113 2

原创 线性表应用 多项式加法

"路漫漫其修远兮, 吾将上下而求索"

2022-05-06 22:07:08 1078

原创 线性表 -2 链表

"正如茶品半日, 其香如初"

2022-04-27 20:09:23 1246 3

原创 数据结构 - 1 顺序表

”要是即刻就忘, 何必费时去学?“---- Hobbes

2022-04-25 13:34:17 555 2

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除