每日LeetCode - 160. 相交链表(C语言)
2021-09-10 19:12
标签:init null com div str image link class ada C语言 #define NULL ((void *)0) // Definition for singly-linked list. struct ListNode { int val; struct ListNode *next; }; struct ListNode *getIntersectionNode(struct ListNode *headA, struct ListNode *headB) { if (headA == NULL || headB == NULL) return NULL; struct ListNode *pA = headA, *pB = headB; while (pA != pB) { pA = pA == NULL ? headB : pA->next; pB = pB == NULL ? headA : pB->next; } return pA; } 每日LeetCode - 160. 相交链表(C语言)标签:init null com div str image link class ada 原文地址:https://www.cnblogs.com/vicky2021/p/14902729.html
文章标题:每日LeetCode - 160. 相交链表(C语言)
文章链接:http://soscw.com/essay/107779.html