Minimum Changes to Make Every Block a Palindrome

Given a password string password of length n and a positive integer k, where n is divisible by k, split the password into consecutive blocks of length k:

password[0:k], password[k...

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: