Company: BNY round 2_22march
Difficulty: medium
Jack receives an integer value K and an encoded message S, where S is a string consisting of numbers, '2', '3',... '9'. In order to understand what the message is trying to convey, he must decode it. Every digit in the encoded message S corresponds to a letter in the decoded message as per the table given below: Letters Numbers A B C 2 D E F 3 G H I 4 J K L 5 M N O 6 P Q R S 7 T U V 8 W X Y Z 9 While decoding the message, he will obtain various combinations of strings. So, for example, let us say S = 23. 2 can be 'A', 'B' or 'C'. Similarly, 3 can be 'D', 'E' or 'F'. So, there are in total 9 combinations possible, AD, AE, AF, BD, BE, BF, CD, CE, CF. Your task is to help Jack find all the combinations after decoding the encoded message, and further return a string representing the Kth lexicographically smallest string. Note: Given two strings, a string will be lexicographically smaller than the other if it appears earlier in the dictionary. Input Specification: input1 : A string S repres