Given a string s, partition it so every substring is a palindrome. Return the minimum number of cuts needed. For "aab", one cut gives ["aa", "b"], both palindromes. For "a", zero cuts needed.
This combines two smaller tasks: checking if substrings are palindromes, and finding minimum cuts. Precompute isPalin[i][j] in , then find minimum cuts with DP in .