Sponsored
Use these hints if you're stuck. Try solving on your own first.
Can we use Dynamic Programming here?
Define DP[i] as the min extra character if breaking up s[0:i] optimally.
Solve with full IDE support and test cases