Why is my code not running?

i think my approach is correct but the compiler is showing WA

@Usha24 you did not update the max frequency variable when you are iterating through the map

yes forgot to add that line, thankyou for the help

1 Like

@Usha24 dont forget to mark the doubt as resolved!