Question: Considering Two Cases Please write program for 1rst question ) Given a string aaabbbcc, compress it, = a3b3c2 . Given that output string's length is

Considering Two Cases Please write program for

1rst question )

Given a string "aaabbbcc", compress it, = "a3b3c2" . Given that output string's length is always smaller than input string, you have do it inplace. No extra space like array should be used.

2nd Question)

Given a string "aaabbbcc", compress it, = "3a3b2c" . Given that output string's length is always smaller than input string, you have do it inplace. No extra space like array should be used.

Please write a very simple Java and C++ program to explain the logic of both the questions . I want to know how to do the program in both C++ and java . I am not clear with the concepts and getting confused. Hence i beg you please provide me correct program of both the QUESTION and write program in C++ and JAVA BOTH

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!