code link== https://ide.codingblocks.com/s/250083
why we using segment [i-m ] during iteration instead of segmnet [ i ].
please clear this logic.
code link== https://ide.codingblocks.com/s/250083
why we using segment [i-m ] during iteration instead of segmnet [ i ].
please clear this logic.
hello @divesh2000
because we are mapping m to index 0 , m+1 to index 1,m+2 to index 2 so on.
because doing this will save memory and we will not need to declare a large size sieve array.
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.