Coviam Interview Question

Count the occurrences of each character of a string using a binary tree.