Autodesk Interview Question

Given a string return the occurrences of each unique element?