Question: use java programming language. Problem 4: Character Frequency (10 points) Develop an algorithm that loops through a given string S and returns the character that

use java programming language.
Problem 4: Character Frequency (10 points) Develop an algorithm that loops through a given string S and returns the character that occurs most frequently. You can assume S contains at least 2 characters and only contains lowercase letters in the English alphabet. If there are more than one characters with the highest frequency, return the character that occurs first in the string. Example output S "abcaadddb" Return: 'a Note: while both 'a' and 'd' occur 3 times, we return 'a' because it occurred first in the string
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
