g1701_1800.s1745_palindrome_partitioning_iv.readme.md Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leetcode-in-java Show documentation
Show all versions of leetcode-in-java Show documentation
Java-based LeetCode algorithm problem solutions, regularly updated
The newest version!
1745\. Palindrome Partitioning IV
Hard
Given a string `s`, return `true` _if it is possible to split the string_ `s` _into three **non-empty** palindromic substrings. Otherwise, return_ `false`.
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.
© 2015 - 2024 Weber Informatics LLC | Privacy Policy