Uber Interview Question

Write code to recursively replace the repeated characters in a string of numbers with their sum.