Not able to get a 1000000 size array

not able to declare array of size 1000000 after using long long int
pl. check my code give correct result for 100000 size array

hello @lakshaygarg128

there is no need of long long (for both the arrays),everything is under the range of int so use int only .this will consume less memory.

1 Like

still getting same error

still getting same error pl. check it again @aman212yadav

if still u r getting any error,
then declare ur both array as global and then try

1 Like

No effect…pl. try to do some changes and make it working
@aman212yadav
You can edit my code

ok wait i m checking

1 Like

check ur code here ->

i have just replaced long long with int

1 Like

thanks alot finaly understood the mistake @aman212yadav :smiley: :smiley:

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.