Question: Decode String Coding UNSOIVID Problem Statement You are learning cryptography and as a challenge, your friend gave you this problem to decode. You are given

Decode String
Coding
UNSOIVID
Problem Statement
You are learning cryptography and as a challenge, your friend gave you this problem to decode. You are given an encoded string. To decode the string, the encoded string is read one character at a time and the following steps are taken:
If the character read is a letter, that letter is written in the decoded string.
If the character read is a digit, say d, the entire decoded string is repeatedly written -7 more times in total
Finally, given an integer k, you need to return the k th letter from the decoded string.
Input format
The first line will have lastring s
The second line will have an integer k.
Output format
The character on the kt index of the decoded string.
Constraints
2 s.length 100
s consists of lowercase English letters and digits 2 through 9.
s start with a letter.
1k100
It is guaranteed that k is less than or equal to the length of the decoded string.
Decode String Coding UNSOIVID Problem Statement

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!