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/detect_capital.rs | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 other/detect_capital.rs (limited to 'other/detect_capital.rs') diff --git a/other/detect_capital.rs b/other/detect_capital.rs deleted file mode 100644 index 454381d..0000000 --- a/other/detect_capital.rs +++ /dev/null @@ -1,20 +0,0 @@ -struct Solution; - -impl Solution { - pub fn detect_capital_use(word: String) -> bool { - let v: Vec = word.chars().collect(); - if v[0].is_lowercase() { - return v.iter().all(|&c| c.is_lowercase()); - } - if v.len() > 1 { - let b = v[1].is_lowercase(); - return v.iter().skip(1).all(|&c| c.is_lowercase() == b); - } - true - } -} - -fn main() { - let word = String::from("USA"); - print!("{}", Solution::detect_capital_use(word)); //true -} -- cgit v1.2.3