Prime Number Sieves

preview_player
Показать описание
We discuss various prime number sieves such as the Sieve of Eranthoses, to find all primes from 1 to N.
We then talk about a segmented sieve approach, and discuss the time complexity for finding primes in a given range.

Code:

References:
Рекомендации по теме
Комментарии
Автор

I am a visual learner and there are very few visual resources for competitive programming. Thank you for taking up the initiative! I find I learn much more by watching your videos than getting lost in walls of text explanations.

codex
Автор

Hi, I am unable to get your point @5:00 where you say that " i > √n ". And then " i * √n <= n " can you please elaborate on it!! Where does this √n comes from and why we are checking values greater than √n. Thanks in advance.

rachit
Автор

Nicely explained Gaurav Sen, I really appreciate your effort to make these videos to helping the ones who needed. If possible, could you please make a video on How to start a competitive programming for complete beginners. What are the basic to advanced things we need to learn to get proficient in programming.

arjungurjar
Автор

Thanks for the great video. Did you check the sieve of Marouane? It avoids calculating the redundancy of odd composites

kevinbow
Автор

Hey Gaurav can you tell me why you have used j=j+(i*2) as the incrementation part instead of j=j+i like for 3 code takes leaps of 6, and for 5 it takes leaps of 10, for 7 it takes leaps of 14

heyitsprabal
Автор

I am bliss to watch this content!Thank you so much 😍

hennabuzzz
Автор

Hi, Please anybody let me know. Where can we run the code of cp problems. Where we can see the space time complexity with custom inputs? Is there any online platform or can setup in vs code.

ANUJSHARMA-nnpf
Автор

bro you are doing great and i request you please explain the terms clearly like why you use root N and how its been used and etc. thank-you bro

Abdullahansari-vbnh
Автор

Hi
Prakash Modak from Pune.
How to find out Prime Numbers in given range of numbers?
Do you have any excel sheet where i can find out Prime Numbers in give range i.e. Prime numbers between 1000 to 3000.

prakashmodak
Автор

If you don't mind can you provide the question link 🔗.

shyamdewkumar
Автор

Gaurav bhaiya.. from where and HOW do i understand bitwise sieve ? It is really getting over my head.

NohandleReqd
Автор

For value like 62 the prime factors of 62 are 31, 2 but give only 2.
I think outer loop run up to N not only root N.

Premsept
Автор

Gentle reminder: at time 16:24, it is 39 not 37, so 3 will also come in the list and hence its frequencies...

shubhamverma
Автор

I m a beginner! Do we check that 54 is divisible by 3 or 27 is divisible by 3?

rajatagarwal
Автор

Hi Gaurav,

The video is pretty good and you made it really easy to understand. But I could not understand the time complexity?

shivangipandey
Автор

Please can you share some optimised code of basic algo. For cc.

manan
Автор

Can you explain how you deduced the time complexity?

allenjamesvinoy
Автор

19:41 Testing your mathematical skills ^^ 78/2 = 39 not 37 :D great video tho! thanks alot

coolDG
Автор

Can anyone help me understand its time complexity of n(logn)(loglogn) ?

nimitjain
Автор

Every prime number can be written in form of 6k +- 1 except 2 and 3 but not all 6k +- 1 is prime number k

jaypatel-mejo