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/partition_array_pivot.rs | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 other/partition_array_pivot.rs (limited to 'other/partition_array_pivot.rs') diff --git a/other/partition_array_pivot.rs b/other/partition_array_pivot.rs deleted file mode 100644 index 8a126da..0000000 --- a/other/partition_array_pivot.rs +++ /dev/null @@ -1,32 +0,0 @@ -struct Solution; - -impl Solution { - pub fn pivot_array(nums: Vec, pivot: i32) -> Vec { - let mut greater = vec![]; - let mut same = 0; - let ans = vec![]; - for n in nums { - if n < pivot { - ans.push(n); - } else if n == pivot { - same += 1; - } else { - greater.push(n); - } - } - for _ in 0..same { - ans.push(pivot); - } - for g in greater { - ans.push(g); - } - ans - } -} - -fn main() { - let s = Solution; - let nums = vec![9,12,5,10,14,3,10]; - let pivot = 10; - print!("{}", s.pivot_array(nums, pivot)); -} -- cgit v1.2.3