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.
Answer to : Question 13584