Given a string A, partition A such that every substring of the partition is a palindrome.
Return the minimum cuts needed for a palindrome partitioning of A.
1 <= length(A) <= 501
The first and the only argument contains the string A.
Return an integer, representing the minimum cuts needed.
A = "aba"
A = "aab"
"aba" is already a palindrome, so no cuts are needed.
Return 1 since the palindrome partitioning ["aa","b"] could be produced using 1 cut.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.