Task 6 Given a string, create a new string with all the consecutive duplicates removed. Hint: You may make a new string to store the result. You can check whether the current character and the next...


Task 6<br>Given a string, create a new string with all the consecutive duplicates removed.<br>Hint: You may make a new string to store the result. You can check whether the current character and the next character are the same, then add that<br>character to the new string.<br>Sample Input:<br>АААВBBBCDDBBECE<br>Sample Output:<br>АВСDВЕCE<br>

Extracted text: Task 6 Given a string, create a new string with all the consecutive duplicates removed. Hint: You may make a new string to store the result. You can check whether the current character and the next character are the same, then add that character to the new string. Sample Input: АААВBBBCDDBBECE Sample Output: АВСDВЕCE

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here