In the video it’s told that a sieve can hold a maximum length of 10^7…
Can you please explain this in a bit more detail…
Conceptual issue
It means the maximum size of sieve array can be upto 10^7. So it can hold upto 10^7 prime numbers.
How is this maximum size determined, like how do we come up with this number 10^7?
There’s no particular logic behind it. Just that size above that can lead to overflow as excess memory will be used.
Like in the code from video, maximum limit ha been taken till 10^6, so can we do this till 10^7. I’m asking this because I tried doing the same in one question and it’s showing segmentation error.
Yeah so I don’t think we can do it.
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.