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

КОМЕНТАРІ • 48

  • @rashidanwar101
    @rashidanwar101 4 місяці тому

    One of the best explanations so far and easy to remember

  • @rohinianekar61
    @rohinianekar61 Рік тому

    GeeksforGeeks is one of the best websites !!

  • @rahulranjan7567
    @rahulranjan7567 3 роки тому +9

    9 ain't a prime

  • @charankorrapati3638
    @charankorrapati3638 3 роки тому +2

    Nice explanation!

  • @JGyanRaj
    @JGyanRaj 3 роки тому +3

    Great explanation 👌👌👍

  • @krishnarao4290
    @krishnarao4290 3 роки тому +5

    Good explanation

  • @revantsai6901
    @revantsai6901 10 місяців тому +1

    Very well explained

  • @nam-ji-ah9375
    @nam-ji-ah9375 Рік тому

    Sandeep sir,❤You are my favourite teacher 🙏

  • @dewashishmehta7360
    @dewashishmehta7360 3 роки тому +6

    He is an excellent teacher

  • @carbyte2673
    @carbyte2673 2 місяці тому

    Fantastic!

  • @kunal_chand
    @kunal_chand 3 роки тому

    Best Explanation

  • @piyushgaur6975
    @piyushgaur6975 3 роки тому +1

    Good teaching

  • @mohamedarshath9022
    @mohamedarshath9022 3 роки тому +1

    Best teacher

  • @isratjahan6969
    @isratjahan6969 3 роки тому

    Excellent😍

  • @deependu__
    @deependu__ 3 роки тому

    thank you sir

  • @bhaskarkumar1829
    @bhaskarkumar1829 2 місяці тому

    The best video I ever saw,, its not bhiaya didi wale playlist se dur hi rehta hoon main ab

  • @corecs1819
    @corecs1819 3 роки тому +1

    Plz keep doing helpful

  • @i_am_afroz_alam
    @i_am_afroz_alam Рік тому +1

    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??

  • @ashwinkumar945
    @ashwinkumar945 2 місяці тому

    Awesome

  • @sivakumar-mw9to
    @sivakumar-mw9to 3 роки тому +3

    Sir can 2 person together combined can buy the course??

  • @bazar9000
    @bazar9000 3 роки тому

    Legend!

  • @basavarajpatil9821
    @basavarajpatil9821 3 роки тому

    Nice one

  • @JG_1998
    @JG_1998 Рік тому +3

    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...

  • @tanaykulkarni822
    @tanaykulkarni822 3 роки тому +2

    Starting the inner loop from i² instead of 2*I also works

    • @rahulkumar-td7pn
      @rahulkumar-td7pn 3 роки тому

      unnecessary iteration count increases if we do that

  • @pratyushraj2640
    @pratyushraj2640 2 роки тому

    ISME ISPRIME FUNC PEHLE BANANA HOGA NA?

  • @user-wc1ep8pm6x
    @user-wc1ep8pm6x 8 днів тому

    Before TCS interview best

  • @kugelblitz7946
    @kugelblitz7946 Рік тому

    can anybody tell me why the time complexity of isPrime() is sqrt(n) ???

    • @kynjribajwatmarbaniang8659
      @kynjribajwatmarbaniang8659 Рік тому

      for checking a number is prime or not you check if the number n is divided or not from 2 to sqrt(n)

  • @mohammedsayeed330
    @mohammedsayeed330 3 роки тому +3

    @geeksforgeeks Please Provide Coupon or discount ..Its hard for poor students like me , iam ready to purchase at some discount

    • @dewashishmehta7360
      @dewashishmehta7360 3 роки тому +1

      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.

  • @shourabhpayal1198
    @shourabhpayal1198 2 роки тому

    best

  • @antareepdas3325
    @antareepdas3325 Рік тому

  • @ahmedshawki5029
    @ahmedshawki5029 Рік тому

    vector is better than memset, i suppose

  • @NikhilKumar-kh2in
    @NikhilKumar-kh2in 3 роки тому

    int j=i*i would be better

  • @pratyushraj2640
    @pratyushraj2640 2 роки тому

    output galat aa rha h sir...its coming like 8 9 10 ...upto n

  • @renni9813
    @renni9813 9 місяців тому

    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

  • @I144US19
    @I144US19 Рік тому

    Why we use j=j+i

  • @SarthakKumar
    @SarthakKumar Рік тому

    If i am not wrong, you are the founder of gfg 😅

  • @nix7260
    @nix7260 2 роки тому

    9 is not a prime number

  • @shankar4330
    @shankar4330 3 місяці тому

    9 is not a prime number!

  • @pcog1216
    @pcog1216 Рік тому +1

    He is founder of GFG 😂

    • @gamerdude1314
      @gamerdude1314 Рік тому

      so is that a laughing matter sure he looks like a geek or nerd! But other than that nothing to laugh bout

    • @pcog1216
      @pcog1216 Рік тому +5

      @@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!

  • @sachinmobilerepair246
    @sachinmobilerepair246 Рік тому

    Sir you speak English but simple meaning is mistaken

  • @swapnadippramanik1619
    @swapnadippramanik1619 3 роки тому

    1st view and comment