Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
For each substring calculate the minimum number of steps to make it palindrome and store it in a table.
Create a dp(pos, cnt) which means the minimum number of characters changed for the suffix of s starting on pos splitting the suffix on cnt chunks.
Solve with full IDE support and test cases