i am not able to approach this problem, please help to figure it out.
I am not able to approach this problem
Hello @anandsingh3210 you can make the frequency array for the character in the string and then check for the character with the max freuquency then
Here for your reference i am attaching the code;
what is the logic i did not understand. how this is working? please explain
first we are incrementing to check which character has occured how many times and then we will check which character has the maximum frequency .
as in the keyboard has 256 characters so we are taking it for 256 that there can be any character in this range.
ok i understood first we are making array of ascii index then we are incrementing the idex value of that char in string.