Nagarro interview question

Program string manipulation frequency count.