Wed Nov 05 2025 13:48:55 GMT+0000 (Coordinated Universal Time)
Saved by @Inescn
public class ListNode() { int val; ListNode next; ListNode(int x) { val = x; } } public class Solution() { public void deleteNode(ListNode node) { node.val = node.next.val; node.next = node.next.next; } }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments