String compression test case

while submitting 2 test cases are showing wrong answr

save your code on ide.codingblocks.com and share link

there are minor changes which you need to do in your code…first initialise your out(String) to “”(empty string) and not " "…also you need to append sum in your string ONLY IF sum>1
refer to this modified code