1.57K subscribers
577 photos
1 file
949 links
Don't miss a day to solve the problem
My leetcode graph - https://leetcode.com/SamoylenkoDmitry/
Download Telegram
Problem URL: [Check if Two String Arrays are Equivalent](https://leetcode.com/problems/check-if-two-string-arrays-are-equivalent/?envType=daily-question&envId=2023-12-01)

Text:
Given two string arrays word1 and word2, return true if the two arrays represent the same string, and false otherwise.

A string is represented by an array if the array elements concatenated in order forms the string.

Example 1:
Input:
- word1 = ["ab", "c"]
- word2 = ["a", "bc"]

Output: true

Explanation:
- word1 represents string "ab" + "c" -> "abc"
- word2 represents string "a" + "bc" -> "abc"
- The strings are the same, so return true.

Example 2:
Input:
- word1 = ["a", "cb"]
- word2 = ["ab", "c"]

Output: false

Example 3:
Input:
- word1 = ["abc", "d", "defg"]
- word2 = ["abcddefg"]

Output: true

Constraints:
- 1 <= word1.length, word2.length <= 10^3
- 1 <= word1[i].length, word2[i].length <= 10^3
- 1 <= sum(word1[i].length), sum(word2[i].length) <= 10^3
- word1[i] and word2[i] consist of lowercase letters.
#### Problem
We are given an array of strings words and a string chars. A string is considered "good" if it can be formed using characters from chars, with each character used only once. We need to find the sum of the lengths of all "good" strings in words.

#### Example 1
- Input:
- words = ["cat","bt","hat","tree"]
- chars = "atach"
- Output: 6
- Explanation: The "good" strings that can be formed are "cat" and "hat", so the answer is 3 + 3 = 6.

#### Example 2
- Input:
- words = ["hello","world","leetcode"]
- chars = "welldonehoneyr"
- Output: 10
- Explanation: The "good" strings that can be formed are "hello" and "world", so the answer is 5 + 5 = 10.

#### Constraints
- 1 <= words.length <= 1000
- 1 <= words[i].length, chars.length <= 100
- words[i] and chars consist of lowercase English letters.

#### Problem URL
[Problem URL](https://leetcode.com/problems/find-words-that-can-be-formed-by-characters/?envType=daily-question&amp;envId=2023-12-02)
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
I am traveling, so here is a sunrise at 11 km, leetcode maybe later
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM