Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Palindrome Partitioning

Partition a string so that every substring is a palindrome. Print all possible partitions, one per line, parts separated by a single space, in the order found by choosing the shortest first part first.

Constraints

1 <= len(s) <= 16 Lowercase letters

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.