Getting run-error although code is getting compiled successfully in online ide
@shahnawaz size of your freq array should be greater than 10^6 since a[i] can be equal to 10^6.
1 Like
made the changes as u said, this time there was no run-error but getting wrong answer as i am submitting it. For sample input code is giving correct output
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.