摘要:
```cpp int GraphPathE(Graph G, int v, int w) { int t; t = Graphdeg(G, v) + Graphdeg(G, w); if ((t % 2) != 0) return 0; for (t = 0; t V; t++) if ((t != v) && (t != w)) ... 阅读全文
摘要:
```cpp int GraphPathE(Graph G, int v, int w) { int t; t = Graphdeg(G, v) + Graphdeg(G, w); if ((t % 2) != 0) return 0; for (t = 0; t V; t++) if ((t != v) && (t != w)) ... 阅读全文
摘要:
```CPP #include using namespace std; struct Graph{ int vertexs; int **adj; }; struct Edge{ int v; int w; }; void GraphInit(Graph* G, int v) { G->vertexs = v; G->adj = new ... 阅读全文
摘要:
```cpp #include using namespace std; struct Graph{ int vertexs; int **adj; }; struct Edge{ int v; int w; }; void GraphInit(Graph* G, int v) { G->vertexs = v; G->adj = new ... 阅读全文
摘要:
```cpp#include #include using namespace std;int main(){ int e[10][10], k, i, j, n, m, t1, t2, t3; cin >> n >> m; for (i = 1; i > t1 >> t2 >>... 阅读全文
摘要:
```cpp#include #include using namespace std;int a[100][100];bool visited[100];int dist[100];void DijkstraPath(int n){ dist[0] = 0; int i; for... 阅读全文
摘要:
> 这是我现在写的版本,我觉得应该算是最凝练的了. 哈哈,容我臭美一下.(我是指那个删除的函数,感觉比那个书上的要好. 主要是我喜欢用二级指针, 而那本书上用的是一级指针加返回一个指针来重建链.)```CPP#include using namespace std;struct Node{ i... 阅读全文
摘要:
```cpp//输入的时候加不加空格都行,因为是前缀表达式.//但是输出中应该要加空格,因为有可能几个数字是挨在一起的情况.//has not complete the `to_prifix`, because i do not know how to do it.#include #include... 阅读全文
摘要:
```cpp#include #include using namespace std;struct Node{ int val; Node* left; Node* right; Node(int x_) : val(x_), left(NULL), right(NULL){}};void InO... 阅读全文
摘要:
### 快速排序```C#include int partition(int *a, int first, int last){ int temp = a[first]; while (last > first){ while (last > first && a[last] >= temp) l... 阅读全文
摘要:
1、数组是一个数据元素的集合,元素之间具有线性关系,但是,元素可以参与多个线性关系;广义表是一个数据元素的集合,元素之间具有线性关系,但其前驱后继可以是一般元素,也可以是一个表。 1)数组(Array):简单说是数据类型相同的一组元素的有序集合。元素在集合中的序是由一组称做“下标”的值确定的,一个数据元素称为一个数组元素。 一个数据元素的位置由多个下标值确定,即参与多个线生关系,每个关系上都有前驱... 阅读全文
|