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/remove_dupplicate.rs | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 other/remove_dupplicate.rs (limited to 'other/remove_dupplicate.rs') diff --git a/other/remove_dupplicate.rs b/other/remove_dupplicate.rs deleted file mode 100644 index c192b22..0000000 --- a/other/remove_dupplicate.rs +++ /dev/null @@ -1,24 +0,0 @@ -struct Solution; - -impl Solution { - pub fn remove_duplicates(nums: &mut Vec) -> i32 { - match nums.is_empty() { - true => 0, - false => { - let mut prev = 0; - for i in 1..nums.len() { - if nums[prev] != nums[i] { - prev += 1; - nums[prev] = nums[i]; - } - } - (prev + 1) as i32 - } - } - } -} - -fn main() { - let mut nums = vec![0,0,1,1,1,2,2,3,3,4]; - print!("{}", Solution::remove_duplicates(nums)); -} -- cgit v1.2.3