Company: Ibm_31oct
Difficulty: medium
Decode Numeric String Problem Description A message is encoded like this: every character is replaced by its decimal ASCII code, the codes are written one after another with no separator, and the whole digit string is then reversed. For example HackerRank becomes the codes 72, 97, 99, 107, 101, 114, 82, 97, 110, 107, which join into 7297991071011148297110107 , and the encoded input is that string read backwards. You are given such an encoded string. Decode it: 1. reverse the given string, so the ASCII codes read from left to right again; 2. walk through the reversed string and cut off one code at a time. At each step look at the next three digits: if they form a valid code, take them; otherwise take the next two digits; 3. turn every code taken into its character. A code is valid when it is 32 (a space), between 65 and 90 (an upper-case letter A - Z ), or between 97 and 122 (a lower-case letter a - z ). Complete the function decode in the editor below. It has the following parameter: e