- 博客(4)
- 资源 (10)
- 收藏
- 关注
原创 Sorting It All Out
Sorting It All Out Description An ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to largest. For example
2013-07-28 10:47:00 729
原创 Topological Sort
#include "stdio.h" #include "string.h" #define VERTEX_NUM 30 int matrix[VERTEX_NUM][VERTEX_NUM];//邻接矩阵 int indegree[VERTEX_NUM];//记录每个顶点的入度 int topological_sort (int n) {//n顶点的个数 int stack[VERTEX_N
2013-07-28 01:24:32 840
原创 有向图或者无向图是否存在环
//判断有向图中是否存在环 #include "stdio.h" #include "string.h" #define VERTEX_NUM 30 //用来记录深度优先生成树的生成过程 int tree[VERTEX_NUM]; int matrix[VERTEX_NUM][VERTEX_NUM]; int visited[VERTEX_NUM]; int has_circle (int n
2013-07-25 18:48:37 1211
原创 二分查找
#include "stdio.h" int bsearch (int *A,int x,int y,int v) { int m; while (x < y) {//[x,y) m = x + (y - x) /2; // printf ("[%d,%d)=%d\n",x,y,m); if (A[m] == v) { return m; }else if (A[m]
2013-07-01 16:12:26 541
maven实战-全面介绍maven使用
2019-03-22
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人