what should be the output for input 1234…?
ABCD
LCD
only these two right…?
Mapped strings problem
also,
AWD ( 1 23 4 )
will be included in the output
can you please tell me little bit about the logic for this question …it is quite difficult to design the recursive case here…?
so basically what we are trying to do i a recursive call where max substring that we form is of leng 2,
starting with the
Base condition: if( pos we reached == original input no size) we insert it into vector
then a for loop
checking the pos+len > n we do nothing (continue)
else we create a substring then convert it to integer , if number is greater than 26 we continue,
else we add to temp string and then recursive call ( where we move to next position )
since the string is updated , we need to pop_back() the value when that particular iteration is complete…
THE question is a slightly diff version of combination sum , practice those, this will come easily.
here is the code for ur refernce
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.