Why am i getting run error?

Please check my code : https://ide.codingblocks.com/s/241832

refer to this code

@HemantKumar
in your code at when your are asssigning 0 to nums[i], then first check even if i is the correct range i.e. i>=m and i<=n.
Also increase RANGE variable to 10^6, it is missing some cases i think.
i have edited your code, have a look https://ide.codingblocks.com/s/247735

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.