https://hack.codingblocks.com/contests/c/537/1569
in this ques, swapping characters means swapping characters from within the i/p string or from a-z?
and pls also explain the test case
Thanks
https://hack.codingblocks.com/contests/c/537/1569
in this ques, swapping characters means swapping characters from within the i/p string or from a-z?
and pls also explain the test case
Thanks
Swapping characters means changing ‘a’ to ‘b’, or changing ‘b’ to ‘a’.
In given test case
2
abba
you are allowed to change at max 2 characters
Hence you can change bb to aa, and hence you get maximum perfectness 4 as given in answer.
alright, got it, thanks!