Leetcode in Java && Oracle
419 subscribers
8 photos
397 files
400 links
Second channel: @codeforces_java

Let's Develop Together!
Download Telegram
image_2021-11-14_00-07-22.png
30.1 KB
#N237. Delete Node in a Linked List
problem link

#solution
class Solution {
public void deleteNode(ListNode node) {
node.val=node.next.val;
node.next=node.next.next;
}
}
p.s.: but the question is totally wrong), because the head node is not given