修改目录结构,优化CMakeLists
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#include <ListNode.h>
|
||||
#include <stdio.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user