Program To Find GCD Or HCF Of Two Given Numbers In Java | FREE DSA Course in JAVA | Lecture 8

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 พ.ย. 2022
  • Data Structures and Algorithms Free Course (Learn DSA Without Paise) Playlist - • Data Structures And Al...
    We are up with the lecture 8 of our much awaited dsa course in java.
    As we are proceeding with our mathematics module of our DSA course, today we will learn how to find the greatest common divisor or highest common factor of given two numbers.
    This is a very basic concept in your journey to competitive programming or many a times companies directly ask for GCD or HCF of two given numbers in the coding round of placement.
    Hence in our data structures and algorithms series, we feel it is important for you to learn the method to find the gcd/hcf of two number.
    In this video we will learn the complete logic behind the program using the AR technology as well as a proper code for the same.
    So without wasting any time, let's jump to our lecture 8 of free dsa course for job placement in java.
    Subscribe to our channel for regular updates on the dsa course and click on the bell icon to never miss an update from our dsa course.
    For more information, fill this form: forms.gle/8eiUmM92Fx563Aen9
    or call us at 8884881203
    Facebook: / thetapacademy
    Instagram: / tapacademy_online
    Linkedin: / 73820805
    Website: www.thetapacademy.com​
    #dsa #dsacourse #java #dsainjava #javaprogramming #coding #coder #gcd #hcf

ความคิดเห็น • 56

  • @AjitKumar-gn1se
    @AjitKumar-gn1se 5 หลายเดือนก่อน +5

    The video might seem too long for people who are looking for a GCD/HCF program. However, once you watch it, the concepts will stick with you and help you whenever you think of GCD and HCF programs. I am a big fan of this man's explanation. Hats off to him!

  • @shilpamanikkan7118
    @shilpamanikkan7118 ปีที่แล้ว +21

    Seriously no words!! this lecture was just perfect. I dint even realize that it was 43 mins video👏👏 Totally worth it💯

    • @TAPACADEMY
      @TAPACADEMY  ปีที่แล้ว +3

      Glad you liked it! Do subscribe to the channel.

    • @shilpamanikkan7118
      @shilpamanikkan7118 ปีที่แล้ว +1

      @@TAPACADEMY done already.. pls post videos that helps in logic building in java.. i am working as backend developer in Java.. it will be so helpful 😊

  • @harichandra1131
    @harichandra1131 11 หลายเดือนก่อน +8

    This channel deserves millions+ Subscriber's
    Such an amazing explanation 🙀

  • @yunik_developer
    @yunik_developer 29 วันที่ผ่านมา

    The best thing is that he covered all exceptions and errors which we will definitely do and it will remember in our mind great explanation

  • @hemambuja-dq6es
    @hemambuja-dq6es 8 หลายเดือนก่อน

    I'm truly amazed by how wonderfully you explained this. Your explanation has left me in awe. Please continue to share your videos, sir!

  • @devrajdpk
    @devrajdpk 11 หลายเดือนก่อน

    Oh my God!, such an amazing explanation. Your video was just recommended by TH-cam and I watch it from start to end. Thanks a lot, man.❤❤❤

  • @varsharajput243
    @varsharajput243 4 หลายเดือนก่อน

    you make every algo so simple and easy.Kudos for your effort.

  • @abhimanyu8131
    @abhimanyu8131 11 หลายเดือนก่อน +2

    mann you are insane !! loved the way you taught!

  • @Hmd_hk
    @Hmd_hk 4 หลายเดือนก่อน

    the way you explain things and make them look so easy is just amazing. keep up the good work man. loves from germany,.

  • @kundrapuharika6294
    @kundrapuharika6294 4 หลายเดือนก่อน

    My god it's unbelievable,this man has explained everything crystal clearly,I feel extremely happy to find this video Thanks a lot sir👏

  • @venkadeshb7973
    @venkadeshb7973 11 หลายเดือนก่อน +3

    ​ @TAPACADEMY Can you please clarify at 42:50 why the Optimized Euclid Algorithm has O = log(Min(a,b)) ? Since the iterations occur for Max value and we keep dividing the Max value hence it should be O = log(Max(a,b)) right?

  • @user-ds4ym3hs4e
    @user-ds4ym3hs4e 9 หลายเดือนก่อน +1

    Sir I have became your fan, by seeing this single video. Literally great 👍 👌 👏 .Not getting any words to appreciate your explanation. Really amazing explanation.

  • @jjoelthomas
    @jjoelthomas 5 หลายเดือนก่อน

    Excellent. Amazing. Hats off

  • @protuctivity-sn3fm
    @protuctivity-sn3fm 10 หลายเดือนก่อน +1

    Best/Perfect Explaination ever ..... 💥

  • @arushitandon4766
    @arushitandon4766 2 หลายเดือนก่อน

    Wow! Your explanation is spot on. Thank you, sir, for providing such informative content.

  • @wul_frik
    @wul_frik ปีที่แล้ว +2

    Really great explanation.

  • @bindu6790
    @bindu6790 6 หลายเดือนก่อน

    Excellent man,superb explanation

  • @simalinaaz5640
    @simalinaaz5640 10 หลายเดือนก่อน

    the best explaination ever!

  • @abhishekkumar-xm3nj
    @abhishekkumar-xm3nj 8 หลายเดือนก่อน

    Sir the way that you are teaching its equal to that Gabriel lame algorithm that reduce reduce our time complexity and Save our data also , because after watching your video We do not have to open any other video Sir you have amazing communication skill. 🙏🙏🙏🙏

  • @raghuvaranr6862
    @raghuvaranr6862 ปีที่แล้ว +3

    Superb explanation 👌 . I never seen thease kind of quality lectures and explanation before.

    • @TAPACADEMY
      @TAPACADEMY  ปีที่แล้ว +1

      Glad to hear that. Stay tuned and do share our course in your community.

  • @Englishwithhimanshu8581
    @Englishwithhimanshu8581 8 หลายเดือนก่อน

    Sir good job sir I understand fully clear

  • @sanskritigupta4445
    @sanskritigupta4445 11 หลายเดือนก่อน

    beautiful explanation sir!!

  • @user-zf7hq4yk4c
    @user-zf7hq4yk4c 11 หลายเดือนก่อน

    just perfect in one word i can say u are!!!the way u explain omg xoxo

  • @be-a-06-surabhibandabe56
    @be-a-06-surabhibandabe56 7 หลายเดือนก่อน

    Great explanation

  • @SP-bs4nk
    @SP-bs4nk ปีที่แล้ว +4

    This video is incredibly informative! I've been struggling with this concept for a while, and your explanation made it so much clearer.

    • @TAPACADEMY
      @TAPACADEMY  ปีที่แล้ว

      Glad to know this. Do subscribe to our channel and share it within your community.

  • @poornacreations2403
    @poornacreations2403 ปีที่แล้ว

    Excellent💯👏

  • @hrithikrudra4292
    @hrithikrudra4292 ปีที่แล้ว

    Awesome 👍👍

  • @user-ik1dr8ud4h
    @user-ik1dr8ud4h 4 หลายเดือนก่อน

    Amazing 🎉🎉

  • @bokinalavijay6876
    @bokinalavijay6876 7 หลายเดือนก่อน

    Thank you sir ❤

  • @116_likhitawanjari2
    @116_likhitawanjari2 8 หลายเดือนก่อน

    very nice and typemaster also greate.

  • @arbazahmadkhan9128
    @arbazahmadkhan9128 ปีที่แล้ว

    Super se upar 👍🏻

  • @abhalad2582
    @abhalad2582 9 หลายเดือนก่อน

    yes we are able to think sir!!😀😀

  • @techtuber1344
    @techtuber1344 ปีที่แล้ว +2

    Great explaination i wish everyone teaches like you :) it will be easier to understand dsa.

    • @TAPACADEMY
      @TAPACADEMY  ปีที่แล้ว

      Thanks man. Do subscribe to the channel for regular tips and lecture updates of the dsa course.

  • @amansrivastav6885
    @amansrivastav6885 9 หลายเดือนก่อน

    nice explanation

  • @kaveridhore4398
    @kaveridhore4398 ปีที่แล้ว

    Best explaination! Thankyouu so much to make this a easy one

    • @TAPACADEMY
      @TAPACADEMY  ปีที่แล้ว +1

      You're welcome 😊

  • @sharonjoe7535
    @sharonjoe7535 5 หลายเดือนก่อน

    you are criminally underrated

  • @user-ux7xh5ji2e
    @user-ux7xh5ji2e 9 หลายเดือนก่อน

    can you please explain how to understand the logic for leetcode and hacker rank problems. your explanation is very good and understand easily

  • @Hasan_770
    @Hasan_770 10 หลายเดือนก่อน

    when calculating frequency 'i' value will be 'i--' (post decrement) not 'i++ '.thanks for this video sir.16:22/43:24

  • @nidhisagar6810
    @nidhisagar6810 6 หลายเดือนก่อน +1

  • @manojkumarmahanta3879
    @manojkumarmahanta3879 ปีที่แล้ว +1

    You are really awesome......
    Please make a video of how to calculate LCM of an array

    • @TAPACADEMY
      @TAPACADEMY  ปีที่แล้ว

      We have made a video on how to calculate LCM in our DSA course. You can use similar concepts.

  • @11csepratikshaargulewar71
    @11csepratikshaargulewar71 ปีที่แล้ว

    Sir ,it should be (log(max(a,b))) not O(log(min(a,b))) as this is a optimised version of Euclid algorithm only in gabriel lame algorithm

  • @bhuvanastutorial373
    @bhuvanastutorial373 4 หลายเดือนก่อน

    can you explain 17:00 , how min+1 will be the frequency , it will be min only sir.

  • @aldricanto7724
    @aldricanto7724 11 หลายเดือนก่อน +1

    what about this code sir ?
    static int hcf(int x , int y) {
    if(y==0) {
    return x;
    }
    else {
    return hcf(y,x%y);
    }
    }
    public static void main(String[] args) {
    int x = 0;
    int y = 19;
    System.out.println(hcf(x,y));
    }
    }

  • @yfjsdgzjdnfn
    @yfjsdgzjdnfn 10 หลายเดือนก่อน +1

    41:32

  • @sagarhaldhar2151
    @sagarhaldhar2151 9 หลายเดือนก่อน

    One day this channel will become A million followers channel
    Great work by you sir

  • @Oneinlove123
    @Oneinlove123 ปีที่แล้ว +2

    please upload 3 or 4 videos daily ..my humble request

  • @chari_gaming8325
    @chari_gaming8325 ปีที่แล้ว

    Hlo bro

  • @satpalghorela4046
    @satpalghorela4046 ปีที่แล้ว

    // please calculate time complexity in this program .
    class gcd {
    public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int c;
    while (b != 0) {
    c = a % b;
    a = b;
    b = c;

    }
    System.out.print("the gcd is: " + a);
    }
    }

  • @51nishanthi.s71
    @51nishanthi.s71 5 หลายเดือนก่อน

    amazing bro