Class Solution
java.lang.Object
g1701_1800.s1745_palindrome_partitioning_iv.Solution
1745 - Palindrome Partitioning IV.<p>Hard</p>
<p>Given a string <code>s</code>, return <code>true</code> <em>if it is possible to split the string</em> <code>s</code> <em>into three <strong>non-empty</strong> palindromic substrings. Otherwise, return</em> <code>false</code>.</p>
<p>A string is said to be palindrome if it the same string when reversed.</p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> s = “abcbdd”</p>
<p><strong>Output:</strong> true</p>
<p><strong>Explanation:</strong> “abcbdd” = “a” + “bcb” + “dd”, and all three substrings are palindromes.</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> s = “bcbddxy”</p>
<p><strong>Output:</strong> false</p>
<p><strong>Explanation:</strong> s cannot be split into 3 palindromes.</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>3 <= s.length <= 2000</code></li>
<li><code>s</code> consists only of lowercase English letters.</li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
checkPartitioning
-