Hot answers tagged

1

Simply put, the logic of encoding the letters is wrong. The logic of the current code is to take the letter from the input string, find the same matching letter in an array (ie, replace q with q, which does nothing), add the key to that ASCII value and apply %26. Finally, applying %26 directly to an ASCII value doesn't produce a valid result. The code needs ...


Only top voted, non community-wiki answers of a minimum length are eligible