DP World Interview Question

Find the occurrence of each character in a string