YULU Off-Campus OA (2025) | Check if Two String Arrays are Equivalent
Question · Posted Jun 2026
Problem Statement Given two string arrays word1 and word2, return true if they represent the same string after concatenating all elements of each array. Otherwise, return false. Example Input word1 = ["ab","c"] word2 = ["a","bc"] Output true Explanation "ab" + "c" = "abc" "a" + "bc" = "abc" Both arrays represent the same string. Constraints 1 <= word1.length, word2.length <= 10^3 1 <= word1[i].length, word2[i].length <= 10^3
The full answer & interview discussion are available to premium members.
Log in Create a free account