From a96b65cbfad7f62f3db6b2eab105e4e25c0414c5 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Fri, 27 Jun 2025 12:23:02 -0600 Subject: chore: remove old cpp and rust solutions --- other/middle_linked_list.rs | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 other/middle_linked_list.rs (limited to 'other/middle_linked_list.rs') diff --git a/other/middle_linked_list.rs b/other/middle_linked_list.rs deleted file mode 100644 index ed84409..0000000 --- a/other/middle_linked_list.rs +++ /dev/null @@ -1,28 +0,0 @@ -#[derive(PartialEq, Eq, Clone, Debug)] -struct Solution; -pub struct ListNode { - pub val: i32, - pub next: Option> -} - -impl ListNode { - #[inline] - fn new(val: i32) -> Self { - ListNode { - next: None, - val - } - } -} - -impl Solution { - pub fn middle_node(head: Option>) -> Option> { - let mut curr = &head; - let mut node_vec: Vec>> = vec![]; - while let Some(node) = curr.as_ref() { - node_vec.push(Some(node.clone())); - curr = &curr.as_ref().unwrap().next; - } - node_vec[node_vec.len() / 2].clone() - } -} -- cgit v1.2.3