XYZ Interview Question

Sum of digits and count repeat char