Getting wrong output

please tell me why i am getting wrong output

@shivamgoel150 at line 26 of your code increment frequency count.