aboutsummaryrefslogtreecommitdiff
path: root/other/check_two_str_arr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'other/check_two_str_arr.rs')
-rw-r--r--other/check_two_str_arr.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/other/check_two_str_arr.rs b/other/check_two_str_arr.rs
new file mode 100644
index 0000000..7fd2a2d
--- /dev/null
+++ b/other/check_two_str_arr.rs
@@ -0,0 +1,19 @@
+struct Solution;
+
+impl Solution {
+ pub fn array_strings_are_equal(word1: Vec<String>, word2: Vec<String>) -> bool {
+ let ans: bool;
+ if word1.join("") == word2.join("") {
+ ans = true;
+ } else {
+ ans = false;
+ }
+ return ans;
+ }
+}
+
+fn main() {
+ let word1 = vec!["ab".to_string(), "c".to_string()];
+ let word2 = vec!["a".to_string(), "bc".to_string()];
+ print!("{}", Solution::array_strings_are_equal(word1, word2));
+}