Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
Yodau. The difference of 0 means that st[i] and st[l-1-i] are the same symbol, so if we change them, we will get a pair of identical symbols (for example: abs('c' - 'c') = 0, and if we change both symbols according to the rules of the task, we will get the following pairs: "bd", "bb", "db", "dd". As we can see, there is at least one pair that can be a palindrome).
The difference of 2 means that in the alphabet between the symbols st[i] and st[l-1-i] there is one symbol (for example, abs('b' - 'd') = 2, and in the alphabet we see a b c d e, between b and d there is one letter. Therefore, if we change these symbols according to the rules of the task, we will get the following pairs: "ae", "ac", "ce", "cc". As we can see, there is at least one pair that can be a palindrome).
In other cases, after the change we will not have pairs with the same symbols.