Minimum Changes for Every Length-K Substring to Be a Palindrome

Given a password string s and an integer k, you may replace any character with any lowercase English letter.

Return the minimum number of character changes needed so that **every contiguous subst...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: