From 5922d38edf2f7124d96e09f17f2b1acd01f02bb8 Mon Sep 17 00:00:00 2001 From: Ocheretovich Date: Tue, 10 Mar 2026 11:37:56 +0200 Subject: [PATCH] fix: remove duplicate solution file for problem 0019 --- ...19-remove-nth-node-from-end-of-the-list.rs | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 rust/0019-remove-nth-node-from-end-of-the-list.rs diff --git a/rust/0019-remove-nth-node-from-end-of-the-list.rs b/rust/0019-remove-nth-node-from-end-of-the-list.rs deleted file mode 100644 index a6787d021..000000000 --- a/rust/0019-remove-nth-node-from-end-of-the-list.rs +++ /dev/null @@ -1,26 +0,0 @@ -impl Solution { - pub fn remove_nth_from_end(head: Option>, n: i32)-> Option> { - let mut list_len=0; - let mut cur=&head; - while let Some(node)=cur{ - list_len+=1; - cur=&node.next; - } - let mut ans=Some(Box::new(ListNode{ - val:1, - next:head - })); - let mut list=&mut ans; - let mut pos=0; - while let Some(node)=list{ - if pos==list_len-n{ - node.next=node.next.clone().unwrap().next.take(); - break; - } - pos+=1; - list=&mut node.next; - } - ans.unwrap().next.take() - } -} -