i only want a hint not a solution
Can i get a hint to this problem
Post the question also, so that i can help you.
Take as input S, a string. Write a function that removes all consecutive duplicates. Print the value returned.
Input Format
String
Constraints
A string of length between 1 to 1000
Output Format
String
Sample Input
aabccba
Sample Output
abcba
Explanation
For the given example, “aabccba”, Consecutive Occurrence of a is 2, b is 1, and c is 2.
After removing all of the consecutive occurences, the Final ans will be : - “abcba”.
you can aslo see code here
Thanks.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
