Creating a HashMap containing char as a key and occurrences as a value
Map = { } NEW_LINE for x in arr : NEW_LINE INDENT if x in Map : NEW_LINE INDENT Map [ x ] += 1 NEW_LINE DEDENT else : NEW_LINE INDENT Map [ x ] = 1 NEW_LINE DEDENT DEDENT