C++
daimashiren
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C语言数据结构笔记——查找算法
#include<iostream>#include<vector>using namespace std;typedef struct{ int length; vector<elem> e;}SStable;typedef struct{ int key;}elem;//无序表上的顺序查找int unSq_search(SStable ST,int key){ int i = ST.length; .原创 2021-09-20 20:35:18 · 145 阅读 · 0 评论 -
C语言数据结构笔记——一次搞定十大排序算法
准备工作定义一个基础的交换函数swapValue()和打印函数output()以便于后续排序函数的调用。#include<iostream>#include<Windows.h>using namespace std;void swapValue(int &a , int &b);void output(int arr[],int len);void swapValue(int &a , int &b){ int.原创 2021-09-20 19:59:47 · 410 阅读 · 0 评论 -
C++打印完全二叉树
思路:完全二叉树可以采用数组顺序存储,而且除最后一层外其余各层都是满的。则可以采用逆序打印的方式,先确定最底层的节点位置及数目,进而确定其上各层的节点位置。打印效果代码实现#include<iostream>#include<stdlib.h>#include<string>#include<vector>#include<cmath>#include<time.h>#include<exceptio原创 2021-09-15 17:30:56 · 1089 阅读 · 0 评论
分享