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/make_string_great.rs | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 other/make_string_great.rs (limited to 'other/make_string_great.rs') diff --git a/other/make_string_great.rs b/other/make_string_great.rs deleted file mode 100644 index 76a28a2..0000000 --- a/other/make_string_great.rs +++ /dev/null @@ -1,21 +0,0 @@ -struct Solution; - -impl Solution { - pub fn make_good(s: String) -> String { - let diff_cases = |c1: char, c2: char| c1.to_ascii_lowercase() == c2.to_ascii_lowercase() && c1 != c2; - s.chars().into_iter().fold(Vec::with_capacity(s.len()), |mut v: Vec, c| { - match v.last() { - Some(prev_c) if diff_cases(c, *prev_c) => { - v.pop(); - } - _ => v.push(c) - } - v - }).iter().collect() - } -} - -fn main() { - let s = "leEeetcode".to_string(); - print!("{}", Solution::make_good(s)); -} -- cgit v1.2.3