💡 Recursion-Duplicate character formatting

i think my approach is correct can you please help me with my code

Hi neerav
You missed the condition when a[i]!=a[i+1]
Your code is corrected :

Hope it helps
Give a like if you are satisfied :slight_smile: