Class Solution
-
- All Implemented Interfaces:
public final class Solution
1745 - Palindrome Partitioning IV\.
Hard
Given a string
s
, returntrue
if it is possible to split the strings
into three non-empty palindromic substrings. Otherwise, returnfalse
.A string is said to be palindrome if it the same string when reversed.
Example 1:
Input: s = "abcbdd"
Output: true
Explanation: "abcbdd" = "a" + "bcb" + "dd", and all three substrings are palindromes.
Example 2:
Input: s = "bcbddxy"
Output: false
Explanation: s cannot be split into 3 palindromes.
Constraints:
3 <= s.length <= 2000
s
consists only of lowercase English letters.
-
-
Constructor Summary
Constructors Constructor Description Solution()
-
Method Summary
Modifier and Type Method Description final Boolean
checkPartitioning(String s)
-
-
Method Detail
-
checkPartitioning
final Boolean checkPartitioning(String s)
-
-
-
-