1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/分割回文串 IV [palindrome-partitioning-iv].html

31 lines
886 B
HTML
Raw Normal View History

2022-03-27 20:45:09 +08:00
<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>