GoLang Solution For LeetCode Problem: Find Words That Can Be Formed by Characters
Solving Find Words That Can Be Formed by Characters in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.
Problem Description
Example 1:
Input: words = ["cat","bt","hat","tree"], chars = "atach"
Output: 6
Explanation:
The 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 strings that can be formed are "hello" and "world" so the answer is 5 + 5 = 10.
Note:
1 <= words.length <= 1000
All strings contain lowercase English letters only.
1 <= words.length <= 1000
See the full details of the problem Find Words That Can Be Formed by Characters at LeetCode
Originally posted at: @github.com/halfrost/LeetCode-Go
Comments
Leave a comment
You are not LoggedIn but you can comment as an anonymous user which requires manual approval. For better experience please Login.