- 博客(17)
- 收藏
- 关注
原创 CentOS8 搭建virtiofs
1. 我选择了qemu stable-5.0版本,因为在这个版本virtiofsd在qemu源码中,编译qumu的时候就可以把virtiofsd也给编译了。2.configure的时候相对于官网的教程,我增加了--enable-gtk --enable-sdl -enable-kvm这3个参数,前两个参数用于在图形界面中运行 QEMU,第三个参数用于使用 KVM 进行硬件加速。可以在make menuconfig里面进行搜索,然后一个一个设置,这里我倒腾了挺久,好像还有一些其他坑。),用这个应该就可以跑。
2024-01-07 17:14:46
1051
3
原创 二叉排序树的合并(严9.38)
#include <iostream>#include <stdio.h>#include <stdlib.h>using namespace std;typedef struct node{ int info; node* lchild; node* rchild;}node,*Pnode;Pnode creat(...
2019-06-29 10:08:28
404
原创 判别是否二叉排序树(耿8.6)
#include <iostream>#include <stdlib.h>#include <stdio.h>using namespace std;typedef struct node{ int info; node* lchild; node* rchild;}node,*Pnode;Pnode creatnode...
2019-06-29 09:50:16
290
原创 树--建立二叉树的二叉链表(由先序中序输出后序)
#include<iostream>#include <stdlib.h>#include <stdio.h>#include <string.h>using namespace std;typedef struct node{ char info; node* lchild; node* rchild; }node, *P...
2019-06-28 21:39:58
797
原创 输出以二叉树表示的算术表达式
#include<iostream>#include <stdlib.h>#include <stdio.h>using namespace std;typedef struct node{ char info; node* lchild; node* rchild; }node, *Pnode;//树的结构体 Pnode creat...
2019-06-28 21:19:48
389
原创 树--统计二叉树叶子节点的数目
#include<iostream>#include <stdlib.h>#include <stdio.h>using namespace std;typedef struct node{ char info; node* lchild; node* rchild; }node, *Pnode;//树的结构体 int cnt=0;/...
2019-06-28 21:11:35
1956
原创 栈--求广义表的深度
我并不会写广义表,所以用了栈......#include<iostream>#include<stdio.h>#include<stdlib.h>#include<string>using namespace std;int main(){ string s; cin>>s; int max=-1;...
2019-06-28 20:59:03
359
原创 树--建立二叉树的二叉链表存储结构
Description:如果用大写字母标识二叉树结点,则一棵二叉树可以用符合下面语法图的字符序列表示。是编写递归程序,由这种形式的字符序列,建立相应的二叉树链表存储结构;#include<iostream>#include <stdlib.h>#include <stdio.h>using namespace std;typedef str...
2019-06-28 20:42:49
1534
原创 稀疏矩阵--以三元组表为存储结构实现矩阵的相加
#include <iostream>#include <stdio.h>#include<stdlib.h>using namespace std;typedef struct Triple{ int i,j; //行号,列号 int num;//数值 }Triple;typedef struct TS{ ...
2019-06-28 20:13:38
1705
原创 栈的运用--由中缀表达式转化为逆波兰表达式
#include<iostream>#include<stdlib.h>#include<stdio.h>using namespace std;typedef struct stack{ char arr[100]; int top;}stack,*Pstack; void init(Pstack t){ t-&...
2019-06-27 19:03:56
271
原创 栈的运用--表达式括号的匹配
#include<iostream>#include<stdlib.h>#include<stdio.h>using namespace std;typedef struct stack{ char arr[100]; int top;}stack,*Pstack; void init(Pstack t){ t-&...
2019-06-27 19:01:47
212
原创 判定给定二叉树是否为二叉排序树
描述试写一个判定给定二叉树是否为二叉排序树的程序,设此二叉树以二叉链表做存储结构,且结点的关键字均不同输入输入一个二叉树的先序序列,若某个节点没有左孩子(右孩子),则左孩子(右孩子)用0表示输出输出二叉树的中序遍历序列,并判断该二叉树是否为二叉排序树,若是,则输出“ItisanBinaryOrderTree!”,否则输出“ItisnotanBinaryOr...
2019-06-20 21:53:25
7358
8
原创 5种排序算法
1.快速排序void quicksort(int a[],int left,int right){2.归并排序void mergeArray(int a[],int left,int middle,int right,int b[]){//合并数组的算法void mergeSort(int a[],int left,int right,int b[])3.冒泡排序void...
2019-06-20 21:20:05
156
原创 3.顺序表的删除
#include <iostream>#include <stdlib.h>#include <stdio.h>using namespace std;typedef struct SeqList{ int arr[1000]; int length;}SeqList,*PSeqList;void creat(PSeqList list...
2019-06-10 23:58:37
235
原创 2.线性表和链表的就地逆置
#include <iostream>#include <stdlib.h>#include <stdio.h>using namespace std;typedef struct SeqList{ int arr[1000]; int length;}SeqList,*PSeqList;typedef struct node...
2019-06-10 23:54:17
426
原创 1.顺序表的插入运算
#include<iostream>#include<stdlib.h>#include<stdio.h>using namespace std;typedef struct SeqList{ int info[1000]; int length;}SeqList,*PSeqList;void creat(PSeqList list){...
2019-06-10 23:48:48
497
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人