Palindrome Partitioning II
Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning of s.
Palindrome Partitioning II

Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning of s.

Example 1:
Input: {"s":"aab"}
Output: 1
Input
arr ={"s":"aab"}

Initialize dp[i] = i (worst case: cut before each char)

Input String

a

a

b

DP Array (min cuts to partition s[0..i])

0

[0]

1

[1]

2

[2]
Length: 3
Variables
No variables to display
DepthFunction Call
Stack empty
0/4