Remove Duplicates
Given a string S, remove consecutive duplicates from it recursively.
Input Format :
String S
Output Format :
Output string
Constraints :
1 <= |S| <= 10^3
where |S| represents the length of string
CodingNinjas
author
2y
Traverse the array and replace the duplicates with the unique elements in it.
CodingNinjas
author
2y
Space Complexity: Explanation: Time Complexity: Explanation:
Help your peers!
Add answer anonymously...
Top SAP Software Developer interview questions & answers
Popular interview questions of Software Developer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app