Compress String
Given a string, you are to compress it so that any consecutive letters are represented by the letter and the count if there is more than one consecutive.
For example
bbbbbaccdddx will result in b5ac2d3x

Answer

Answers are hidden from search engines.
coding language=java