code is giving wrong answer for testcase2
Mapped string problem
@Ajitverma1503 in the recursive case when you are checking for 2 digit numbers, you also have to check whether num3 is less than or equal to 26 or not.
If num3 comes out to be greater than 26 then you donβt to call the recursive function for num3. For eg, if input is β36β, then you have to print for β3β as well as β6β but not for β36β because there is no mapping for β36β in the array.
I have made the required changes in your code an added the comment as well where the changes are made.
Hope this helps.
thanks for correcting
1 Like