It is not going to change anything. By default all elements of array are not zero some of them are zero and some of them are one or garbage so we have to fill all the elements with zero which is same .
Sir I visited your website after Harkirat sir's webinar, But I can't able to singup in takeuforward website also no content showing loading AToZ - DSA page, why is it sir, help me out
Here the space complexity is O(n) but we can reduce it to O(n/2) by ignoring the even numbers as all the even numbers are multiple of 2. So we can ignore them.
For n = 31, we get an indexing till 30 right ? So, while printing the indices we have elements till 30 and not 29, that has been done. Hope it's clear now.
Hey i know i am late but just an advice. Start with the A-Z sheet as soon as possible without waiting for it to be finished. Striver has left only 4-5 topics but rest 13-14 are there with detailed explanation. If you are in college trust me you will never get this time back again. It will be very hard to study DSA along with job. I am working professional and it is very difficult to study when you are tired because of work and only have weekends to study long. So fight your procrastination and start studying. All the best
Your explanation is much better than Leetcode editorial
Sieve of Era&%#.... something like that🤣🤣🤣
Nice Solution👍
Understood
I think that was publicity move 😜
Understood; I'm improving my thought process in every video; Thank you bro;
Bro explained it smooth like butter
UNDERSTOOD every bit ..... Thank u soo much !!
if your video doesn't exist for a concept, well it sure that we are going to have hell a lot of trouble in getting the intuition
Understood........Thank You So Much for this wonderful video.............🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
inner loop can be started from i*i
just want to say that : Pdh ke Mza aa gya
Arrays.fill(prime,1) in java
wow
IF WE INITIALISE VECTOR LIKE { vector arr(n+1,1)} DOES IT STILL CONSIDERED AS O(N) TIME???
Yes as it is not exact time taken.. It is just an asymptotic notation of time taken, an assumption of how fast the code will run.
The thing is you don't have to you can just think of 0 as primes and mark 1 for non primes
With memset, however, the values are not set to the integer 1; they are set to a non-zero integer (16843009), which is not correct for this algorithm.
Wonderful explanation ❤❤
Thanks brother, you have got very nice teaching skills
Instead of filling the arrays with one and then changing them to zeros, isn't it better to use the default zero and change it to 1 accordingly?
It is not going to change anything.
By default all elements of array are not zero some of them are zero and some of them are one or garbage so we have to fill all the elements with zero which is same .
Sir I visited your website after Harkirat sir's webinar, But I can't able to singup in takeuforward website also no content showing loading AToZ - DSA page, why is it sir, help me out
Nice effort sir.. 👌 😊
Great explanation. Understood
Excellent explanation sir
Here the space complexity is O(n) but we can reduce it to O(n/2) by ignoring the even numbers as all the even numbers are multiple of 2. So we can ignore them.
n/2 is still n
Yeah my bad. ..I forgot about that... constants are ignored and still O(n) @@FutFreaKKKKK
Striver Sir , i am your Jabra fan
Such a nice method!
Thank u so much ✨
Your work load added eye shades
Waiting for string playlist...,
Why the array has taken n+1
For n = 31, we get an indexing till 30 right ? So, while printing the indices we have elements till 30 and not 29, that has been done. Hope it's clear now.
When it will be complete?? I am confused to start . I am thinking to start this series but when it will completely end of this batch
Hey i know i am late but just an advice. Start with the A-Z sheet as soon as possible without waiting for it to be finished. Striver has left only 4-5 topics but rest 13-14 are there with detailed explanation. If you are in college trust me you will never get this time back again. It will be very hard to study DSA along with job. I am working professional and it is very difficult to study when you are tired because of work and only have weekends to study long. So fight your procrastination and start studying. All the best
@@codeman3828 thank you for your kind advice..
@@codeman3828 Really appreciative
12:30
Understood ❤
11:16
thanks bhaiya
Can you please bring a video on How to actually derive the time complexity based on maths, that'll be more helpful.
already have a vdo on his channel
just watch his lectures and in each one he explains in depth....aise hi seekh jaoge bhot kch.....same as me
Sir i have just started a2z how much time should it take to complete
It would take around 3-4 months
If you study 4 hours daily
Undestood 😺
Thanks man
Where is thecode
understand sieve of eras thaas theens :)
if n is as big as 10^7 it will give TLE
nahh it will not
Understood :))
nice !
31/05 Revise
understood
Great
thank you
With memset, however, the values are not set to the integer 1; they are set to a non-zero integer (16843009), which is not correct for this algorithm.
Understood ❤
understood
understood
understood
understood
understood