Sieve of Eratosthenes | Sample Video II for Essential Maths for CP | GeeksforGeeks
Вставка
- Опубліковано 24 гру 2020
- GeeksforGeeks presents you the Sample Video II for Essential Mathematics for CP.
Link for the course mentioned above - practice.geeksforgeeks.org/co...
Our courses :
practice.geeksforgeeks.org/co...
Please Like, Comment and Share the Video among your friends.
Install our Android App:
play.google.com/store/apps/de...
If you wish, translate into the local language and help us reach millions of other geeks:
ua-cam.com/users/timedtext_cs_p...
Follow us on Facebook:
/ gfgvideos
And Twitter:
/ gfgvideos
Also, Subscribe if you haven't already! :)
#competitiveprogramming #cp #checkforprime #cpcourse #gfg #geeksforgeeks
One of the best explanations so far and easy to remember
GeeksforGeeks is one of the best websites !!
9 ain't a prime
Nice explanation!
Great explanation 👌👌👍
Good explanation
Very well explained
Sandeep sir,❤You are my favourite teacher 🙏
He is an excellent teacher
Fantastic!
Best Explanation
Good teaching
Best teacher
Excellent😍
thank you sir
The best video I ever saw,, its not bhiaya didi wale playlist se dur hi rehta hoon main ab
Plz keep doing helpful
3:36 why do we consider 5??...we have to traverse upto √20 which is 4.47 i.e 4 but 5 is a prime number greater than √20??
Awesome
Sir can 2 person together combined can buy the course??
Legend!
Nice one
For my computer architecture class I have to do the last type of sieve algorithm, but I have to code it in assembly. I have no idea where to even begin...
i do feel the pain brother
Starting the inner loop from i² instead of 2*I also works
unnecessary iteration count increases if we do that
ISME ISPRIME FUNC PEHLE BANANA HOGA NA?
Before TCS interview best
can anybody tell me why the time complexity of isPrime() is sqrt(n) ???
for checking a number is prime or not you check if the number n is divided or not from 2 to sqrt(n)
@geeksforgeeks Please Provide Coupon or discount ..Its hard for poor students like me , iam ready to purchase at some discount
Try freecodecamp website and their youtube channel, if you would like to learn anything related to Development. You will have a vast knowledge.
However gfg courses are industry standard.
best
vector is better than memset, i suppose
int j=i*i would be better
output galat aa rha h sir...its coming like 8 9 10 ...upto n
My implementation from hearing what the sieve actually is was:
vector sieveOfErothesomething(int n){
vector primes{};
vector thing(n+1, true);
for(int x : {2, 3, 5})
for (int i = x * x; i < thing.size(); i += x) thing[i] = false;
for(int i = 2; i
Why we use j=j+i
so it moves to it multiples
If i am not wrong, you are the founder of gfg 😅
9 is not a prime number
9 is not a prime number!
He is founder of GFG 😂
so is that a laughing matter sure he looks like a geek or nerd! But other than that nothing to laugh bout
@@gamerdude1314 I was just surprised when I came to know that he is founder of GFG, I felt like laughing because how well a founder of such a big organization was teaching.
I never said he is geek or nerd. Don't impose your thoughts on me!
Sir you speak English but simple meaning is mistaken
1st view and comment