摘要:
/* * description: 图的ADT实现(邻接矩阵) * writeby: Nick * date: 2012-10-25 23:32 * */#include <iostream>#include <vector>using namespace std;struct Edge{ int v, w; Edge(int v=-1, int w=-1) : v(v), w(w) {}};class Graph{ private: int vcount, ecount; //记录顶点总数... 阅读全文
posted @ 2012-10-25 23:35
wouldguan
阅读(1725)
评论(0)
推荐(0)
摘要:
/* * description: 链表归并排序示例 * writeby: nick * date: 2012-10-23 16:35 * */#include <iostream>#define maxN 10using namespace std;struct node{ int item; node *next; node(int n){item=n; next=0;}};typedef node *link;link merge(link a, link b) //合并a b 链表{ node du... 阅读全文
posted @ 2012-10-25 10:29
wouldguan
阅读(3042)
评论(0)
推荐(0)
浙公网安备 33010602011771号