_3138

package
v0.0.0-...-5ea41ec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2025 License: MIT Imports: 1 Imported by: 0

README

同位字符串连接的最小长度

给你一个字符串 s ,它由某个字符串 t 和若干 t  的 同位字符串 连接而成。

请你返回字符串 t 的 最小 可能长度。

同位字符串 指的是重新排列一个字符串的字母得到的另外一个字符串。例如,"aab","aba" 和 "baa" 是 "aab" 的同位字符串。

示例 1:

**输入:**s = "abba"

**输出:**2

解释:

一个可能的字符串 t 为 "ba" 。

示例 2:

**输入:**s = "cdef"

**输出:**4

解释:

一个可能的字符串 t 为 "cdef" ,注意 t 可能等于 s 。

提示:

  • 1 <= s.length <= 105
  • s 只包含小写英文字母。

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL