Why i am getting wrong answers in three testcases
Remove Duplicates
Hello vaishnavi,
Your logic is bit wrong .for example if input is aaaaa your code will output aaa
Hint include s[i] in your answer only for following two cases
a)when i==s.size()-1
b) when s[i]!=s[i+1]
For other cases just call recursion to i+1