Vivek, your video is very helpful. But it has the same problem our Indian education system has. We always learn how to do something. But we are never thought why. You just stated the rules, that we should only consider upto the sqrt of the number. But you haven't explained why it is the way it is. This is what we want. We want to understand how things work. Not just how to do things.
Maybe watch some other video for that. No one should ideally spoon feed the 'why? why not? what if it does not?' of every topic. You can always google or ask on stack overflow.
let's say that we keep increasing i, thus i = 11, which is the first not marked i after 7 . Checking 11*2 = 22, this number is marked, because we already marked every x*2 number. Checking 11*3 = 33, this number is marked too, and the reason of that is the same. Continuing we find out that every 11*x where x < 11 is marked. Let's check 11*11, but wait, we need to check numbers [1;50], and clearly 11*11> 50. Thus for every y we need to check y*x numbers where x>=y ,so i need to be in range [1:sqrt(n)].
There is so much to learn from you Vivek, All videos are beneficial. Appreciate for putting it all together. The algorithm code you pasted over git has too much complexity and the time complexity could also go wierd. Can the below code fit? void primeNumbers(int num) { int i=0; for(i=2;i
Super clear the way you've explained it. Thank you
Brilliant & simple short to grasp easily compared to code school & gaurav sen youtube channels :)
Thank you a lot!
nice sir, you've saved our time..... thumbs up to your efforts
I miss Eratosthenes .
first I am getting confused then I see your video I am getting to know.about it and Thank you sir for explaining it.
Excellent explaination sir ,also can you make a video on sliding window technique
Vivek, your video is very helpful. But it has the same problem our Indian education system has. We always learn how to do something. But we are never thought why. You just stated the rules, that we should only consider upto the sqrt of the number. But you haven't explained why it is the way it is. This is what we want. We want to understand how things work. Not just how to do things.
Maybe watch some other video for that. No one should ideally spoon feed the 'why? why not? what if it does not?' of every topic. You can always google or ask on stack overflow.
what are the numbers that exactly divides the number...?
Sol: Let's take n=20
We will find by writting i
Super ...sir u explained clearly i understand very clearly..tq u sir
let's say that we keep increasing i, thus i = 11, which is the first not marked i after 7 . Checking 11*2 = 22, this number is marked, because we already marked every x*2 number. Checking 11*3 = 33, this number is marked too, and the reason of that is the same. Continuing we find out that every 11*x where x < 11 is marked. Let's check 11*11, but wait, we need to check numbers [1;50], and clearly 11*11> 50. Thus for every y we need to check y*x numbers where x>=y ,so i need to be in range [1:sqrt(n)].
Thank you sir..very helpful video
Thank you very much sir
Nice explanation
how you got that we have to take square root of n
clear explanation, thank you!
thank you sir 😊
thank you sir
thanks sir day after tomorrow is my semester final thank you
very good explanation..thank you
thanks Mahesh
Mujhe toh kuch samaj aya
Crazy bro love you
Very nice sir
Thank you sir I understand it today
czcams.com/video/0ABnO_WoexE/video.html
를 이용하여
1부터 1,000까지 사이에 있는
소수의 개수(counting prime numbers)를 구하는 영상 입니다.
Thanks.
amazing!
There is so much to learn from you Vivek, All videos are beneficial. Appreciate for putting it all together. The algorithm code you pasted over git has too much complexity and the time complexity could also go wierd.
Can the below code fit?
void primeNumbers(int num)
{
int i=0;
for(i=2;i
Thank you
simple rule find prime no "6n+/-1"
Can you please explain it further?
nice 1.
nice !! thank you
Sir please explain in hindi
Sieve of erotosthnese have counting 1 to 100
2to7 lea
Awesome!
try out skin care
Not most efficient. Why considering even numbers ?
.
Thank you very much sir