Segmented Prime Sieve - video

When we have found the vector having all primes upto 10^5 for finding primes between 2 given numbers m and n, then for each prime in vector shouldn’t we start marking from (prime[i]) * (prime[i]) in the segmented array as all its earlier multiple would have been already marked?
But In video the start point is taken to be (m/prime[i])*prime[i] ?

hello @deep4013

yeah u can but then we need to consider some cases
one case that is coming to my mind is this -> prime[i]*prime[i] < m for such case again u need to first find nearest muliple of prime[i] which is greater than equal to m.

so to avoid any implementation mistake its better to use the method taught in video