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
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
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM