Question d’entretien chez Accenture

In String Find the unique words and its count