{"push_id":954691394,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"e71be8da6f4cc2dbfe810bb642ba22b7d31d74b8","before":"97ed4c56db80e17d66f3c64bf5888c41ae6a000c","commits":[{"sha":"e71be8da6f4cc2dbfe810bb642ba22b7d31d74b8","author":{"email":"3233a2abaff1b874da673567ac80963e41199931@gmail.com","name":"Prateek Mehrotra"},"message":" Caesar Cipher\n\nJulius Caesar protected his confidential information by encrypting it\nin a cipher. Caesar's cipher rotated every letter in a string by a\nfixed number, K, making it unreadable by his enemies. Given a string,\nS, and a number, K, encrypt S and print the resulting string.\n\nNote: The cipher only encrypts letters; symbols, such as -, remain\nunencrypted.\n\nInput Format\n\nThe first line contains an integer, N, which is the length of the\nunencrypted string.\nThe second line contains the unencrypted string, S.\nThe third line contains the integer encryption key, K, which is the\nnumber of letters to rotate.\n\nConstraints\n1≤N≤100\n0≤K≤100\nS is a valid ASCII string and doesn't contain any spaces.\n\nOutput Format\n\nFor each test case, print the encoded string.\n\nSample Input\n\n11\nmiddle-Outz\n2\n\nSample Output\n\nokffng-Qwvb\n\nExplanation\n\nEach unencrypted letter is replaced with the letter occurring K spaces\nafter it when listed alphabetically. Think of the alphabet as being\nboth case-sensitive and circular; if K rotates past the end of the\nalphabet, it loops back to the beginning (i.e.: the letter after z is\na, and the letter after Z is A).\n\nSelected Examples:\nm (ASCII 109) becomes o (ASCII 111).\ni (ASCII 105) becomes k (ASCII 107).\n− remains the same, as symbols are not encoded.\nO (ASCII 79) becomes Q (ASCII 81).\nz (ASCII 122) becomes b (ASCII 98); because z is the last letter of the\nalphabet, a (ASCII 97) is the next letter after it in lower-case\nrotation.","distinct":true,"url":"https://api.github.com/repos/prateekmehrotra/HackerRank-Algorithms/commits/e71be8da6f4cc2dbfe810bb642ba22b7d31d74b8"}]}