I am getting correct output but getting run time error in test cases
To remove runtime error you should specify size properly [1000000] as 10^6 makes no sense to compiler.
yeah i have edited it but i am still not passing test cases
Yes you have some logical error, see this exact code:
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.