摘要: #include #include #include #include using namespace std;const int maxn = 100;bool g[maxn][maxn], visited[maxn];int n;queue q;void init(){ memset(g,... 阅读全文
posted @ 2014-06-09 23:57 海滨银枪小霸王 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 1.判断单链表是否存在环2.找出环节点node* loopstart(node *head){ if(head==NULL) return NULL; node *fast = head, *slow = head; while(fast && fast->next){ ... 阅读全文
posted @ 2014-06-09 21:31 海滨银枪小霸王 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 如4->4->6 + 2->4 = 4->7->0#include using namespace std;typedef struct node{ int data; node *next;}node;node* init(int a[], int n){ node *head=... 阅读全文
posted @ 2014-06-09 20:32 海滨银枪小霸王 阅读(226) 评论(0) 推荐(0) 编辑