mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-10 18:48:13 +08:00
31 lines
886 B
HTML
31 lines
886 B
HTML
<p>给你一个字符串 <code>s</code> ,如果可以将它分割成三个 <strong>非空</strong> 回文子字符串,那么返回 <code>true</code> ,否则返回 <code>false</code> 。</p>
|
||
|
||
<p>当一个字符串正着读和反着读是一模一样的,就称其为 <strong>回文字符串</strong> 。</p>
|
||
|
||
<p> </p>
|
||
|
||
<p><strong>示例 1:</strong></p>
|
||
|
||
<pre>
|
||
<b>输入:</b>s = "abcbdd"
|
||
<b>输出:</b>true
|
||
<strong>解释:</strong>"abcbdd" = "a" + "bcb" + "dd",三个子字符串都是回文的。
|
||
</pre>
|
||
|
||
<p><strong>示例 2:</strong></p>
|
||
|
||
<pre>
|
||
<b>输入:</b>s = "bcbddxy"
|
||
<b>输出:</b>false
|
||
<strong>解释:</strong>s 没办法被分割成 3 个回文子字符串。
|
||
</pre>
|
||
|
||
<p> </p>
|
||
|
||
<p><strong>提示:</strong></p>
|
||
|
||
<ul>
|
||
<li><code>3 <= s.length <= 2000</code></li>
|
||
<li><code>s</code> 只包含小写英文字母。</li>
|
||
</ul>
|