swaaaay
swaaaay
全部文章
题解
未归档(36)
归档
标签
去牛客网
登录
/
注册
swaaaay的博客
全部文章
/ 题解
(共4篇)
题解 | #找出单向链表中的一个节点,该节点到尾指针的距离为K#
来自专栏
列表转链表,再双指针 class node: def __init__(self, data): self.val = data self.next = None class Solution: def __init__(self):...
Python3
链表
2021-11-23
0
534
题解 | #删除链表中重复的结点#
来自专栏
字典计数,数组转链表的解法 class Solution: def deleteDuplication(self , pHead: ListNode) -> ListNode: # write code here if not pHead: retur...
Python3
数组
链表
2021-11-23
0
380
题解 | #两个链表的第一个公共结点#
来自专栏
class Solution: def FindFirstCommonNode(self , pHead1 , pHead2 ): # write code here mark1,mark2=pHead1,pHead2 while mark1!...
Python3
链表
2021-11-12
0
339
题解 | #删除链表的节点#
来自专栏
class Solution: def deleteNode(self , head: ListNode, val: int) -> ListNode: # write code here # 极端情况 if not h...
Python3
链表
2021-11-12
0
409