Skip to content
StackDecode
Dynamic programmingExplained

Palindrome Partitioning

Fewest cuts so every piece is a palindrome.

Time

O(n²)

Extra space

O(n²)

Use it for

String splitting.

An animated walkthrough for this algorithm isn’t built yet. The summary above explains the idea; see the related animated algorithms below to practise the same technique.