摘要:
#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,... 阅读全文
摘要:
1.判断单链表是否存在环2.找出环节点node* loopstart(node *head){ if(head==NULL) return NULL; node *fast = head, *slow = head; while(fast && fast->next){ ... 阅读全文
摘要:
如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=... 阅读全文