← ALL NOTES
String

132. Palindrome Partitioning II

Same setup as #131 — cut the string into palindromes — but now you only want the minimum number of cuts, not the partitions themselves. That shift is what lets you drop from exponential to O(n²): you…

Loading…