Why is the maximum size of sieve array 10^7 ? How did we get that value?

In the video it is mentioned that maximum size of sieve array is 10^7 and hence we had to find another approach. My question is how do we get that limit? Should not it depend on OS and hardware I am using?

hi @manisini.chakraborty this value depends on the compiler, mostly you’ll find 10^7 is the limit.

Why is it 10^7 ? on what factors does it depend?

@manisini.chakraborty https://discuss.codechef.com/t/maximum-size-of-an-array/3633

1 Like

Thanks a lot. I will go through the thread

1 Like

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.