摘要:
1---2---3 ---4---5---6---711---12---链表1:1---2---3---4---5---6---7链表2:11---12---4---5---6---7解决方案:1.直接将链表1中的节点与链表2中的节点进行比较;如果存在相同的则相交。缺点:效率慢。2.将链表1建... 阅读全文
摘要:
1.第一种实现bool List_is_loop(slist *head){ slist *slow=head; slist *fast=head; while(NULL!=fast && NULL!=fast->next) { slow=slow->next; fast=fas... 阅读全文