Skip to content

Practice Palindrome Partitioning IV

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Hard#1745
LeetCode Problem

Palindrome Partitioning IV

Problem Statement

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.

Source: Palindrome Partitioning IV on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
s = "abcbdd"
Output
true

# Example 2

Input
s = "bcbddxy"
Output
false

Constraints

3 <= s.length <= 2000
s​​​​​​ consists only of lowercase English letters.

Related LeetCode Problems

Practice more problems similar to Palindrome Partitioning IV.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.