We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee467e6 commit d4b32ddCopy full SHA for d4b32dd
src/easy/find_words_containing_character.rs
@@ -0,0 +1,15 @@
1
+struct Solution;
2
+
3
+impl Solution {
4
+ pub fn find_words_containing(words: Vec<String>, x: char) -> Vec<i32> {
5
+ let mut out = vec![];
6
7
+ for (i, w) in words.iter().enumerate() {
8
+ if w.contains(x) {
9
+ out.push(i as i32)
10
+ }
11
12
13
+ out
14
15
+}
src/easy/mod.rs
@@ -3,6 +3,7 @@ mod check_if_one_string_swap_can_make_strings_equal;
mod clear_digits;
mod count_pairs_whose_sum_is_less_than_target;
mod find_the_difference;
+mod find_words_containing_character;
mod guess_number_higher_or_lower;
mod image_smoother;
mod last_stone_weight;
0 commit comments