Question: Let's say there is an encoding scheme where integer 1 encodes character 'A', integer 2 encodes character 'B' and so on till integer 26 which
Let's say there is an encoding scheme where integer 1 encodes character 'A', integer 2 encodes character 'B' and so on till integer 26 which encodes character 'Z'. With this encoding scheme, write a java function to count all possible decoding of a given digit sequence. There are several input-output examples provided below. Also look at the assumptions you can make at the end and keep it simple. Hint: Do it recursively! Example 1 Input = "12"Output = 2
Step by Step Solution
3.42 Rating (152 Votes )
There are 3 Steps involved in it
Here is the java code that uses a recursive approach to count all possible decodings of a given digi... View full answer
Get step-by-step solutions from verified subject matter experts
