Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Sequence ¶
type Sequence struct {
// contains filtered or unexported fields
}
Sequence 用于查询该字符串是否存在目录子串 注意: 只实现全小写字母匹配
原理: 创建一个字符串长度二维数组,倒序遍历字符串,当前字符出现 则当前位置设置为字符串索引,其它位置设置为下一层的值
使用: seq := New("ahbgdc")
true == seq.HasSubsequence("abc")
func (*Sequence) HasSubsequence ¶
HasSubsequence 是否包含子串 target
Click to show internal directories.
Click to hide internal directories.