We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57a8c24 commit 08c0a4aCopy full SHA for 08c0a4a
237-delete-node-in-a-linked-list/solution.py
@@ -0,0 +1,14 @@
1
+# Definition for singly-linked list.
2
+# class ListNode:
3
+# def __init__(self, x):
4
+# self.val = x
5
+# self.next = None
6
+
7
+class Solution:
8
+ def deleteNode(self, node):
9
+ """
10
+ :type node: ListNode
11
+ :rtype: void Do not return anything, modify node in-place instead.
12
13
+ node.val = node.next.val
14
+ node.next = node.next.next
0 commit comments