TORONTO KIDS COMPUTER CLUB | Markham Saturday 14:00 Java Homework 20.03.28.
17298
post-template-default,single,single-post,postid-17298,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Markham Saturday 14:00 Java Homework 20.03.28.

02 Apr Markham Saturday 14:00 Java Homework 20.03.28.

Question:
Input a string using a scanner and output  a “cleaned” string where adjacent characters that are the same have been reduced to a single char.


Use recursion

Sample Input 1:
Yyzzza

Sample Output 1:
Yza


Sample Input 2:
Apple

Sample Output 2:
aple

No Comments

Sorry, the comment form is closed at this time.