aboutsummaryrefslogtreecommitdiff
path: root/other/check_two_str_arr.rs
diff options
context:
space:
mode:
authorJack Sangdahl <[email protected]>2025-03-10 00:36:13 -0600
committerJack Sangdahl <[email protected]>2025-03-10 00:36:13 -0600
commit7c60dee83b436e8e8a667bf9f191beced8de4fc3 (patch)
treeeb7a24ee2067f92245c57bb118e85a1baf15df50 /other/check_two_str_arr.rs
parent5d7cdc215e4ba1ec4cbb24c084cccb5e5e641468 (diff)
downloadleetcode-7c60dee83b436e8e8a667bf9f191beced8de4fc3.tar.gz
leetcode-7c60dee83b436e8e8a667bf9f191beced8de4fc3.zip
chore: move cpp and rust code to directory
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));
+}