Palindrome Partitioning Problem
Palindrome Partitioning Problem — ExecCode Hard DSA Practice
Solve the Palindrome Partitioning problem on ExecCode. Free online hard DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. Example: s = "aab" Output: [["a","a","b"],["aa","b"]]
Examples
Input s = "aab"; Output [["a", "a", "b"], ["aa", "b"]]. Input s = "abc"; Output [["a", "b", "c"]]. Input s = "a"; Output [["a"]]
Constraints
1 <= s.length <= 16 s contains only lowercase English letters.
Practice Palindrome Partitioning free on ExecCode. Browse DSA problems, topic map, and placement guides.