Short Problem Definition:
Julius Caesar protected his confidential information from his enemies by encrypting it. Caesar rotated every alphabet in the string by a fixed number K. This made the string unreadable by the enemy. You are given a string S and the number K. Encrypt the string and print the encrypted string.
time complexity is O(?)
space complexity is O(?)
This task has a few non-obvious pitfalls.
- upper case does not rotate into lower case (as one would expect from ascii)
- k can be bigger than the alphabet size (and must be corrected or a modulo operation on the whole sum must be performed)
Basically you need separate logic for upper case and lower case letters.