Skip to content

Commit a61c1fa

Browse files
authored
Create 237. Delete Node in a Linked List (#471)
2 parents 2c10ca4 + a662b91 commit a61c1fa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

237. Delete Node in a Linked List

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Solution {
2+
public:
3+
void deleteNode(ListNode* node) {
4+
node->val=node->next->val;
5+
node->next=node->next->next;
6+
7+
}
8+
};

0 commit comments

Comments
 (0)