标签:题目 rgba self type 练习 task elf __init__ 复杂
1.删除链表中的节点https://leetcode-cn.com/problems/delete-node-in-a-linked-list/
一开始没看清题目中传入的参数为“要被删除的节点”,找了半天链表在哪
1 class ListNode: 2 def __init__(self, x): 3 self.val = x 4 self.next = None 5 6 class Solution: 7 def deleteNode(self, node): 8 """ 9 :type node: ListNode 10 :rtype: void Do not return anything, modify node in-place instead. 11 """ 12 node.val = node.next.val 13 node.next = node.next.next
时间复杂度82%
2.除自身以外数组的乘积https://leetcode-cn.com/problems/product-of-array-except-self/
3.Nim游戏https://leetcode-cn.com/problems/nim-game/
Datawhale编程实践(LeetCode 腾讯精选练习50)Task16
标签:题目 rgba self type 练习 task elf __init__ 复杂
原文地址:https://www.cnblogs.com/zmbreathing/p/datawhale_leetcode_task16.html