![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
查找算法
文章平均质量分 68
SunnyPotter
http://sunnypotter8.sinaapp.com/
展开
-
Dijkstra算法
#define MAXVEX 9 #define INFINITY 65535 typedef int Patharc[MAXVEX]; //用于存储最短路径下标的数组 typedef int ShortPathTable[MAXVEX]; // 用于存储到各点最短路径的权值和 void ShortestPath_Dijkstra(MGraph G, int V0, Pa原创 2014-01-08 15:12:29 · 815 阅读 · 0 评论 -
查找算法之折半查找
#include #include #include int Binary_Search(int *a, int n, int key) { int low, high, mid; low = 1; high = n; // while(low <= high) { mid = (low+high)/2; if(key < a[mid]) high = mid -原创 2014-01-02 18:24:01 · 657 阅读 · 0 评论