[Solved] : Question 13584

Adjacent repetitions – have a number 13368945501113. In this number there are some adjacent repetitions. Wherever we see a number being repeated side by side, we need to add them. So the number would look like 16689410033 after the first iteration. now we see that this resulting number has repetitions too. So we need to do the same operation until there are no more adjacent repetitions. The final output of this should be 4894106.

The program should accept any number like the above, and should return it after removing all the adjacent duplicates.


Expert Answer


Answer to : Question 13584

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?