GlobalLogic interview question

Print Letter and its frequency in the string