Check a given number is power of 2 | Bitwise operator || Competitive Programming ||

Sdílet
Vložit
  • čas přidán 13. 09. 2024
  • In the series of competitive programming today we learn very important algorithm in bitwise operator to check the given number is power of 2 or not by using bit wise AND ( & ) Operator. competitive programming. codecehef solution also in hello world.
    ----------------------------------------------------------------------------------------
    Code in this video : github.com/Pri...
    Pdf of this video : github.com/Pri...
    ASCII Table link : www.cs.cmu.edu...
    Home-work Questions : www.codechef.c...
    *Follow me on Instagram *
    Instagram► / helloworldbyprince
    *Follow me on Twitter *
    Twitter► / prince_king_
    Our Students Contacts Form:-
    Form link : docs.google.co...
    ------------------------------------------------------------------------
    Our mission is to provide a free course for all students in Hindi in better way or in friendly way.
    Competitive programming or CP is a buzzword when a guy is a freshie in computer science branch and most of the guys don't have proper guidance that is needed. So in this series of video lectures I will be guiding you through various problems, myths, future scopes and a lot more related exclusively to competitive programming.
    #competitiveprogramming #binarytodecimal #decimaltobinary

Komentáře • 59

  • @soutrikmaiti4133
    @soutrikmaiti4133 Před 4 lety +8

    I was asked this same question in Amazon Lab 126 coding challenge by a technical recruiter. I was able to solve this using Brute force but I wish I knew this technique because I got stuck while optimizing it. Thanks for this explaination.

  • @iamabhayagnihotri
    @iamabhayagnihotri Před rokem +1

    Literally I enjoyed a lot 😃✌️
    I must say clean,clear , energetic and Full of value 🙏

  • @anikakash9208
    @anikakash9208 Před 4 lety +2

    Just Wow, I read some blog about it but can't understand then I search it on CZcams and find this. It really helps me to understand. Thank You, and I'm from Bangladesh!

    • @HelloWorldbyprince
      @HelloWorldbyprince  Před 4 lety

      Your most Welcome ...I have most amazing content on competitive programming ...you can check also ❤️

  • @thakurjangid6658
    @thakurjangid6658 Před 3 lety +1

    Sir app bhot achaa pdhate hooo,
    😁 tnxxxx jo chij bhot time se smj ni aa rhi thi apne 15min me amja diii.

    • @HelloWorldbyprince
      @HelloWorldbyprince  Před 3 lety +1

      keep learning buddy and be consistent and share my channel with your college groups that helps me a lot

    • @thakurjangid6658
      @thakurjangid6658 Před 3 lety

      @@HelloWorldbyprince yes
      i will share your channel sirr.🤗🤗

  • @sharmaprachi87
    @sharmaprachi87 Před rokem

    explained in a easy way.thanks

  • @RahulKumar-ui8xw
    @RahulKumar-ui8xw Před rokem

    Wonderful logic

  • @utkarshdixit3502
    @utkarshdixit3502 Před 3 lety

    bhot bhot badhiya video.

  • @muntahahasan2857
    @muntahahasan2857 Před 3 lety +2

    Really awesome 👍
    Thanks and please keep uploading

  • @sachin_bhandari8470
    @sachin_bhandari8470 Před 5 lety +2

    Thanks bro.. keep uploading useful videos for competitive programming

    • @HelloWorldbyprince
      @HelloWorldbyprince  Před 5 lety +1

      Your welcome sachin ...but please share my channels in your social media. and tell with your friends

  • @saurabhshandilay8261
    @saurabhshandilay8261 Před 3 lety +1

    vaah bete moj kardi ;)

  • @manmeetsingh1537
    @manmeetsingh1537 Před 3 lety +1

    Mja agya

  • @manojkumar-qm4mx
    @manojkumar-qm4mx Před 3 lety

    Wow great idea
    Thank you so much sir.

  • @craxyguy8033
    @craxyguy8033 Před 2 lety +2

    thank u
    🤗

  • @UchihaAmruh
    @UchihaAmruh Před 4 lety

    Bruv I can only partially understand hindi and this was still the most helpful vid on this topic. Thanks a bunch

  • @anshulksingh
    @anshulksingh Před 4 lety +2

    What abt if scaneed 1.?

  • @mdrakibulhasn1884
    @mdrakibulhasn1884 Před 11 měsíci

    you are a gem. thanks dada

  • @adityaadhyan830
    @adityaadhyan830 Před 3 lety

    Very efficient BRO!

  • @payalsagar1808
    @payalsagar1808 Před 4 lety

    beautiful!👌👌👌👌👏 and with this one new subscriber!🙌

  • @neoop4800
    @neoop4800 Před 5 lety +2

    #completed
    #include
    using namespace std;
    int main() {
    int T;
    cin>>T;
    while(T--){
    char N;
    cin>>N;
    if(N=='B' ||N== 'b') cout

  • @AbhishekKumar-gg6ox
    @AbhishekKumar-gg6ox Před 5 lety +1

    Literally aaj naya kuch sikha

    • @HelloWorldbyprince
      @HelloWorldbyprince  Před 4 lety

      Thanks

    • @AbhishekKumar-gg6ox
      @AbhishekKumar-gg6ox Před 4 lety

      @@HelloWorldbyprince By the way I have solved all ur uploaded videos Qs and Literally Qs were very Good. I must appreciate your working. I want more Qs.
      Can I contact you personally.?

  • @aniketjaiswal3874
    @aniketjaiswal3874 Před 4 lety

    #completed

  • @techcheatsheettutorial129

    Sir you beautifully explained it👌👌

    • @HelloWorldbyprince
      @HelloWorldbyprince  Před 4 lety

      Thanks a lot man ...❤️❤️
      Please share my channel with your friends

  • @DMDRPBHU
    @DMDRPBHU Před 4 lety

    wow sir

  • @vakilsingh6078
    @vakilsingh6078 Před 4 lety

    great sir!!

  • @nki583
    @nki583 Před 3 lety

    Thanks bro

  • @beingentrepreneur9458
    @beingentrepreneur9458 Před 4 lety

    Maja aa gya sir ....

    • @HelloWorldbyprince
      @HelloWorldbyprince  Před 4 lety

      thanks a lot ... please share this channel more and more .. so that my efforts will be rewarded and more enthusiast come in my channel

  • @surajkumarsaw7398
    @surajkumarsaw7398 Před 4 lety

    #complete

  • @user-zw1xp7it3o
    @user-zw1xp7it3o Před 4 lety

    Make videos on zco questions

  • @adityachauhan1182
    @adityachauhan1182 Před 4 lety

    A little bit correction sir , your program will give wrong out put for x=0 so , use condition x &&!( x&(x-1))

    • @bhupendranagda9563
      @bhupendranagda9563 Před 4 lety +1

      hey aditya you also started with cp I want a partner so that we can do it better
      like if you are interested mail me honeynagda99@gmail.com

    • @adityachauhan1182
      @adityachauhan1182 Před 4 lety

      @@bhupendranagda9563 yea I am ready , you can contact me by mail chauhanaditya673@gmail.com or 9369693145 ( whatsapp)

    • @anjneykumarsingh4461
      @anjneykumarsingh4461 Před 4 lety

      Bhai mereko v help kro

  • @AnuragSingh-iy7fz
    @AnuragSingh-iy7fz Před 4 lety

    #completed
    #include
    using namespace std;
    int main()
    {
    int t;
    cin>>t;
    while(t--)
    {
    char ch;
    cin>>ch;
    if(ch=='b' || ch=='B')
    cout

  • @kirankumareera2793
    @kirankumareera2793 Před 3 lety

    its failed in negative number

  • @sush9889
    @sush9889 Před 4 lety

    answer to aa gya guru but (x & (x-1)) hi kyu kiya gya? koi aur operator kyu use nhi kiya

  • @rishabhpandey8892
    @rishabhpandey8892 Před 4 lety

    #include
    using namespace std;
    int main() {
    int t;
    cin>>t;
    while(t--)
    {
    char c;
    cin>>c;
    if(c=='B' || c=='b')
    cout

  • @AnuragVerma-ys9vm
    @AnuragVerma-ys9vm Před 4 lety

    Sir getting stuck when input is upto 10^18 in a question of geeks for geeks I am getting wrong answer when input is 1099511627776

  • @shankarkumarkarn7450
    @shankarkumarkarn7450 Před 4 lety

    #completed
    #include
    #include
    using namespace std;
    int main()
    {
    int T; cin>>T;
    while(T--)
    {
    char c; cin>>c;
    if(c=='b' || c=='B')
    cout

  • @anshumanraturi
    @anshumanraturi Před rokem

    this code is wrong for 1099511627776 as input.

  • @azrallex
    @azrallex Před 4 lety

    #completed

  • @amitjaiswal6594
    @amitjaiswal6594 Před 5 lety +1

    #completed

  • @garvitchoudhary4661
    @garvitchoudhary4661 Před 4 lety

    #completed

  • @pawansinghal585
    @pawansinghal585 Před 4 lety

    #completed

  • @rohananand9905
    @rohananand9905 Před 4 lety

    #completed