![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
小米椒waits
OS啊啊啊啊啊
展开
-
Dijkstra 邻接表的实现
啊啊啊啊原创 2019-05-13 20:28:14 · 1121 阅读 · 0 评论 -
判别是否二叉排序树(耿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 · 235 阅读 · 0 评论 -
树--建立二叉树的二叉链表(由先序中序输出后序)
#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 · 748 阅读 · 0 评论 -
输出以二叉树表示的算术表达式
#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 · 356 阅读 · 0 评论 -
树--统计二叉树叶子节点的数目
#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 · 1921 阅读 · 0 评论 -
栈--求广义表的深度
我并不会写广义表,所以用了栈...... #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 · 322 阅读 · 0 评论 -
树--建立二叉树的二叉链表存储结构
Description:如果用大写字母标识二叉树结点,则一棵二叉树可以用符合下面语法图的字符序列表示。是编写递归程序,由这种形式的字符序列,建立相应的二叉树链表存储结构; #include<iostream> #include <stdlib.h> #include <stdio.h> using namespace std; typedef str...原创 2019-06-28 20:42:49 · 1480 阅读 · 0 评论 -
稀疏矩阵--以三元组表为存储结构实现矩阵的相加
#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 · 1647 阅读 · 0 评论 -
判定给定二叉树是否为二叉排序树
描述试写一个判定给定二叉树是否为二叉排序树的程序,设此二叉树以二叉链表做存储结构,且结点的关键字均不同 输入 输入一个二叉树的先序序列,若某个节点没有左孩子(右孩子),则左孩子(右孩子)用0表示 输出 输出二叉树的中序遍历序列,并判断该二叉树是否为二叉排序树,若是,则输出“ItisanBinaryOrderTree!”,否则输出“ItisnotanBinaryOr...原创 2019-06-20 21:53:25 · 7079 阅读 · 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 · 128 阅读 · 0 评论 -
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 · 209 阅读 · 0 评论 -
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 · 400 阅读 · 0 评论 -
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 · 441 阅读 · 0 评论 -
二叉排序树的合并(严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 · 368 阅读 · 0 评论