HASH MAPPING : TEST CASE NOT SATISFIED

TEST CASE NOT SATISFIED!

Hey @mverma_be19

if(input[i+1]!=’\0’)
{
int second=input[i+1]-‘0’;
int no=dig*10+second;
if(no<10||no>36)return ; //ADDED THIS
char ch=no+‘A’-1;
output[j]=ch;
map(input,output,i+2,j+1);
}

2 digit no should be valid

But why are we take the range of 10-36 ?

Sorry it should be if(no<10||no>26)return ; //ADDED THIS

Because 10-26 will have a mapping character and rest don’t have any mapping
if no is 08 or something then it evaluates to 8 and we don’t have to consider it
again if no is 27 then we don’t have any mapping for 27