Redfin Interview Question

Write Print letters followed by their frequency (Run Length Encoding) #Input aaabcc Output a3b1c2