Rust 0ms
\nimpl Solution {\n    pub fn remove_nth_from_end(head: Option<Box<ListNode>>, n: i32) -> Option<Box<ListNode>> {\n         let mut dummy = Box::new(ListNode {\
```\nimpl Solution {\n    pub fn remove_nth_from_end(head: Option<Box<ListNode>>, n: i32) -> Option<Box<ListNode>> {\n         let mut dummy = Box::new(ListNode {\n            val: -1,\n            next: head,\n        });\n\n        let mut right = dummy.clone();\n        let mut left = dummy.as_mut();\n\n        for _ in 0..n {\n            right = right.next.unwrap();\n        }\n\n        while let Some(node) = right.next {\n            right = node;\n            left = left.next.as_mut().unwrap();\n        }\n\n        left.next = left.next.as_mut().unwrap().next.clone();\n\n        dummy.next\n    }\n}\n```
[]