20241024 finished.

This commit is contained in:
2024-10-24 09:08:13 +08:00
parent 3102da99a8
commit bce8de1c85
266 changed files with 2321 additions and 2014 deletions

View File

@@ -3,7 +3,6 @@
*/
pub struct Solution {}
// submission codes start here
impl Solution {
@@ -15,7 +14,7 @@ impl Solution {
words.push(word);
}
}
let length = words.len();
let mut result = String::from(words[length - 1]);
@@ -36,6 +35,9 @@ mod tests {
#[test]
fn test_151() {
assert_eq!("blue is sky the".to_owned(), Solution::reverse_words("the sky is blue".to_owned()));
assert_eq!(
"blue is sky the".to_owned(),
Solution::reverse_words("the sky is blue".to_owned())
);
}
}