05 2018 档案

摘要:#include "assert.h"#include using namespace std;void Sort(int *a,int n){ int i=0,j=0,k=n-1; while(j""> n; int * a= new int[n]; f... 阅读全文
posted @ 2018-05-16 09:09 UnderScrutiny 阅读(140) 评论(0) 推荐(0)
摘要:#include #include using namespace std;typedef int E;typedef char T;const int maxWeight=1000;class Graph{private: T *verticesList; ... 阅读全文
posted @ 2018-05-09 20:51 UnderScrutiny 阅读(170) 评论(0) 推荐(0)
摘要:#include using namespace std;class Stack{private: int top,maxSize; int *element;public: Stack(int sz){ top=0; m... 阅读全文
posted @ 2018-05-09 18:39 UnderScrutiny 阅读(410) 评论(0) 推荐(0)
摘要:#include #include using namespace std;const int DefaultVertices=100;const int maxWeight=1000;typedef int E;typedef char T;class Graphm... 阅读全文
posted @ 2018-05-04 23:18 UnderScrutiny 阅读(1218) 评论(0) 推荐(0)
摘要:#include using namespace std;struct TreeNode{ char value; TreeNode *leftChild; TreeNode *rightChild; TreeNode():leftChild(... 阅读全文
posted @ 2018-05-02 20:51 UnderScrutiny 阅读(177) 评论(0) 推荐(0)
摘要:#include #include using namespace std;const int DefaultVertices=100;const int maxWeight=1000;typedef int E;typedef char T;class Graphm... 阅读全文
posted @ 2018-05-02 20:04 UnderScrutiny 阅读(182) 评论(0) 推荐(0)
摘要:稀疏矩阵的压缩存储:实现稀疏矩阵压缩存储,并实现矩阵转置和求和。输入矩阵时,首先需要输入非零元素的个数,然后分别输入矩阵的 行号,列号和值。输完2个矩阵后,自动进行计算第一个矩阵的转置以及两个矩阵的和。例如:输入如下:100 90 5 //矩阵的行数为100,列数为9... 阅读全文
posted @ 2018-05-02 19:27 UnderScrutiny 阅读(689) 评论(0) 推荐(0)
摘要:实现二叉树的基本操作:建立、遍历、计算深度、结点数、叶子数等。输入C,先序创建二叉树,#表示空节点;输入H:计算二叉树的高度;输入L:计算二叉树的叶子个数;输入N:计算二叉树节点总个数;输入1:先序遍历二叉树;输入2:中序遍历二叉树;输入3:后续遍历二叉树;输入F:查... 阅读全文
posted @ 2018-05-02 09:42 UnderScrutiny 阅读(211) 评论(1) 推荐(1)