Question d’entretien chez Amdocs

2- Given a string containing characters, return a numeric string representing each character and it’s frequency(see example) Input: AABBCD Output: 2A2B1C1D