代码随想录第四天 | 24. 两两交换链表中的节点 19.删除链表的倒数第N个节点 面试题 02.07. 链表相交 142.环形链表II

发布时间 2023-10-28 22:40:44作者: fires610

question 1 :Swap Nodes in Pairs

https://leetcode.cn/problems/swap-nodes-in-pairs/

I was a little confused at first because I'm thinking whether should I creat a new head, but soon I came up with the idea of creat pre = None and with an 'if - else' structure to deal the problem

question 2:Remove Nth Node From End of List

https://leetcode.cn/problems/remove-nth-node-from-end-of-list/

easy

question 3 : Intersection of Two Linked Lists LCCI

https://leetcode.cn/problems/intersection-of-two-linked-lists-lcci/

fine

question 4 :Linked List Cycle II

the question ask to return -1 if there don't exist a cycle, but actually should return 'None'

leetcode 英语版太糟糕了