Skip to content

Commit 1cf5d9b

Browse files
G3
1 parent 0417a23 commit 1cf5d9b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* Definition for singly-linked list.
3+
* struct ListNode {
4+
* int val;
5+
* ListNode *next;
6+
* ListNode(int x) : val(x), next(NULL) {}
7+
* };
8+
*/
9+
class Solution {
10+
public:
11+
void deleteNode(ListNode* node) {
12+
*node=*node->next;
13+
}
14+
};

0 commit comments

Comments
 (0)