Sir, please help me to find error in my code
for input aabbcc
output should be a*ab*bc*c
correct this
it should be β aabbcc β or β aabbcc β ?
i think, it should be aabbc*c ?
sorry sir, itβs writting correctly in chat box. whatever i want to write
i have corrected it .it was getting styled due to the *
you have to put * at all the pairs
sir, please help me to find error in my code
you are just placing * between the first duplicate.
Display the resulting string (i.e after inserting (*) b/w all the duplicate characters)
In this question, the idea is to put a recursive function on the Array and print * if we got any repetitive character.
Algorithm:
- Obtain the result for substring starting at index 1. Store this in another string , say βrosβ .
- Check whether the first character of current string and first character of ros are same.
- If so return , add a " * " to the new result and concatenate as s[0] + " * " + ros.
- Else simply return s[0] + ros.
sir, i tried. but, i unable to implement. please send me your code.
see this:
if this solves your doubt please mark it as resolved