package leetcode;

/**
 * https://leetcode.com/problems/check-if-two-string-arrays-are-equivalent/
 */
public class Problem1662 {
    public boolean arrayStringsAreEqual(String[] word1, String[] word2) {
        // TODO
        return false;
    }

    public static void main(String[] args) {
        Problem1662 prob = new Problem1662();
        System.out.println(prob.arrayStringsAreEqual(
            new String[]{"ab", "c"}, new String[]{"a", "bc"})); // true
        System.out.println(prob.arrayStringsAreEqual(
            new String[]{"a", "cb"}, new String[]{"ab", "c"})); // false
        System.out.println(prob.arrayStringsAreEqual(
            new String[]{"abc", "d", "defg"}, new String[]{"abcddefg"})); // true
    }
}

@@ -12,16 +12,78 @@
 tcode;%0A%0A
+import java.util.Arrays;%0Aimport java.util.stream.Collectors;%0A%0A
 /**%0A * h
@@ -271,524 +271,177 @@
     
-// TODO%0A        return false;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Problem1662 prob = new Problem1662();%0A        System.out.println(prob.arrayStringsAreEqual(%0A            new String%5B%5D%7B%22ab%22, %22c%22%7D, new String%5B%5D%7B%22a%22, %22bc%22%7D)); // true%0A        System.out.println(prob.arrayStringsAreEqual(%0A            new String%5B%5D%7B%22a%22, %22cb%22%7D, new String%5B%5D%7B%22ab%22, %22c%22%7D)); // false%0A        System.out.println(prob.arrayStringsAreEqual(%0A            new String%5B%5D%7B%22abc%22, %22d%22, %22defg%22%7D, new String%5B%5D%7B%22abcddefg%22%7D)); // true
+String s1 = Arrays.stream(word1).collect(Collectors.joining(%22%22));%0A        String s2 = Arrays.stream(word2).collect(Collectors.joining(%22%22));%0A        return s1.equals(s2);
 %0A   

Solve problem 1662