Amazon Interview Question

Number of unique characters in a string and their frequency