Editorial algo doesnot pass all the test cases

my code passes two test cases so i check editorial but editorial solutioin does not passes any of the test cases

hello @aasif2364

pls share ur code i will check

Coding Blocks IDE

i think u have shared wrong link .
the code is not related to max frequency

Coding Blocks IDE

u have shard this code with me,

can u please confirm in which question u have doubt, u have raise doubt for differnt question and u are sharing different code

question is maximum frequency of a character

sorry i am not saving the code in the ide check this is the code which passing 2 test cases

ur logic is incorrect, u cant say that a number is having maximum frequenccy just by look at consecutive two characters.

store freuquency of each char in array and the pick that char which has maximum frequency
check this->

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.