LeetCode --- 1668. Maximum Repeating Substring 解题报告
Posted 杨鑫newlfe
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LeetCode --- 1668. Maximum Repeating Substring 解题报告相关的知识,希望对你有一定的参考价值。
For a string sequence
, a string word
is k
-repeating if word
concatenated k
times is a substring of sequence
. The word
\'s maximum k
-repeating value is the highest value k
where word
is k
-repeating in sequence
. If word
is not a substring of sequence
, word
\'s maximum k
-repeating value is 0
.
Given strings sequence
and word
, return the maximum k
-repeating value of word
in sequence
.
Example 1:
Input: sequence = "ababc", word = "ab" Output: 2 Explanation: "abab" is a substring in "ababc".
以上是关于LeetCode --- 1668. Maximum Repeating Substring 解题报告的主要内容,如果未能解决你的问题,请参考以下文章
LeetCode笔记:Biweekly Contest 94
[BZOJ1668][Usaco2006 Oct]Cow Pie Treasures 馅饼里的财富
nginx: [alert] kill(1668, 1) failed (3: No such process)的解决办法及nginx服务常用命令总结