Java LeetCode Challenge: String Array Comparison

Day 5/50 | #50DaysOfCode 📍 Platform: LeetCode 💻 Language: Java ✅ 1662. Check If Two String Arrays are Equivalent (Easy) Today’s problem focused on string concatenation and comparison. It helped reinforce my understanding of arrays, string handling, and equality checks. 🔎 Approach: Concatenate all elements of word1 to form a single string Concatenate all elements of word2 to form another string Compare the two resulting strings If both strings are equal, return true, otherwise false 📌 Example: Input: word1 = ["ab","c"], word2 = ["a","bc"] Output: true Explanation: word1 → "ab" + "c" = "abc" word2 → "a" + "bc" = "abc" Both strings are equal. This problem strengthened my understanding of string manipulation and array traversal in Java. #DSA #LeetCode #Java #CodingJourney #ProblemSolving #Consistency #LearningJourney #50DaysOfCode #LinkedIn

  • graphical user interface, text

To view or add a comment, sign in

Explore content categories