3138. Minimum Length of Anagram Concatenation Medium
1/**
2 * [3138] Minimum Length of Anagram Concatenation
3 *
4 * You are given a string s, which is known to be a concatenation of anagrams of some string t.
5 * Return the minimum possible length of the string t.
6 * An anagram is formed by rearranging the letters of a string. For example, "aab", "aba", and, "baa" are anagrams of "aab".
7 *
8 * <strong class="example">Example 1:
9 * <div class="example-block">
10 * Input: <span class="example-io">s = "abba"</span>
11 * Output: <span class="example-io">2</span>
12 * Explanation:
13 * One possible string t could be "ba".
14 * </div>
15 * <strong class="example">Example 2:
16 * <div class="example-block">
17 * Input: <span class="example-io">s = "cdef"</span>
18 * Output: <span class="example-io">4</span>
19 * Explanation:
20 * One possible string t could be "cdef", notice that t can be equal to s.
21 * </div>
22 *
23 * Constraints:
24 *
25 * 1 <= s.length <= 10^5
26 * s consist only of lowercase English letters.
27 *
28 */
29pub struct Solution {}
30
31// problem: https://leetcode.com/problems/minimum-length-of-anagram-concatenation/
32// discuss: https://leetcode.com/problems/minimum-length-of-anagram-concatenation/discuss/?currentPage=1&orderBy=most_votes&query=
33
34// submission codes start here
35
36impl Solution {
37 pub fn min_anagram_length(s: String) -> i32 {
38 0
39 }
40}
41
42// submission codes end
43
44#[cfg(test)]
45mod tests {
46 use super::*;
47
48 #[test]
49 fn test_3138() {
50 }
51}
52
Back
© 2025 bowen.ge All Rights Reserved.