Company: Idfc_29march
Difficulty: medium
Simple Cipher Decryption Problem Description A simple cipher is built on the alphabet wheel which has uppercase English letters ['A'-'Z'] written on it: Given an encrypted string consisting of English letters ['A'-'Z'] only, decrypt the string by replacing each character with the k th character away on the wheel in the counter-clockwise direction. Counter-clockwise is the opposite direction in which the hands on a clock usually move. In the image, Z is 1 unit counter-clockwise from A. Complete the function simpleCipher in the editor below. simpleCipher has the following parameter(s): string encrypted : the string to decrypt int k : the position of the character to find Returns: string : the decrypted string Examples Example 1: Input: encrypted = 'VTAOG', k = 2 Output: TRYME Explanation: Looking back 2 from 'V' returns 'T', from 'T' returns 'R', and so on. The decrypted string is 'TRYME'. Example 2: Input: encrypted = 'CDEF', k = 2 Output: ABCD Explanation: Each character is replaced by