unable to do usng recursion
String compression,
send me the code i will modify and help you to find your mistake
i m not able to approach using recursion
in the parameters take str, i, ,prev_char , count, out ,j
if prev_char==str[i] increase count
else out[j]=count;
and call recursively for next char (by increasing i)
now try to implement
1 Like
1 case is still not executing
β0β+30=78 it will add ascii values which we donβt want
so we have to use a function to_string()it converte integer to string and then insert itβs character to output array