Longest Chunked Palindrome Decomposition

Hard

📝 Description

Split text into maximum parts where parts read same forwards and backwards

Input Format

String text

Output Format

Maximum number of parts

Constraints

1 ≤ text.length ≤ 1000

🔍 Sample Input

"ghiabcdefhelloadamhelloabcdefghi"
            

✅ Sample Output

7
            

Code Editor

Please login to run and submit code.

Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run