Number of 1 Bits | Live Coding with Explanation | Leetcode - 191

Sdílet
Vložit
  • čas přidán 31. 01. 2021
  • This video explains 2 Approaches and a recursive solution with follow up for number of 1 bits leetcode 191
    To support us you can donate
    Patreon: / algorithmsmadeeasy
    UPI: algorithmsmadeeasy@icici
    Paypal: paypal.me/algorithmsmadeeasy
    Check out our other popular playlists:
    ✅✅✅[ Tree Data Structure ] : • Tree Data Structure
    ✅✅✅[ Graphs Data Structure ] : • Graph Data Structure
    ✅✅✅[ December Leetcoding Challenge ] : • December Leetcoding Ch...
    ✅✅✅[ November Leetcoding Challenge ] : • November Leetcoding Ch...
    ✅✅✅[ August Leetcoding Challenges ] : • August LeetCoding Chal...
    ✅✅✅[ July Leetcoding Challenges ] : • July LeetCoding Challe...
    ✅✅✅[ Cracking the Coding Interview - Unique String ] : • Cracking the Coding In...
    ✅✅✅[ June Leetcoding Challenges ] : • June LeetCoding Challe...
    ✅✅✅[ May Leetcoding challenges ]: • May LeetCoding Challen...
    Problem Link: leetcode.com/problems/number-...
    Code Link : github.com/Algorithms-Made-Ea...
    If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful.
    #coding #leetcode #programminglife #programmingisfun #programmer #tech #software #codinglife #leetcode

Komentáře • 24

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

    We hope you all are enjoying our videos!!! Don't forget to leave a comment!!! Please like the video to support us!!!
    Questions you might like:
    ✅✅✅[ Tree Data Structure ] : czcams.com/play/PLJtzaiEpVo2zx-rCqLMmcFEpZw1UpGWls.html
    ✅✅✅[ Graphs Data Structure ] : czcams.com/play/PLJtzaiEpVo2xg89cZzZCHqX03a1Vb6w7C.html
    ✅✅✅[ December Leetcoding Challenge ] : czcams.com/play/PLJtzaiEpVo2xo8OdPZxrpybGR8FmzZpCA.html
    ✅✅✅[ November Leetcoding Challenge ] : czcams.com/play/PLJtzaiEpVo2yMYz5RPH6pfB0wNnwWsK7e.html
    ✅✅✅[ August Leetcoding Challenge ] : czcams.com/play/PLJtzaiEpVo2xu4h0gYQzvOMboclK_pZMe.html
    ✅✅✅July Leetcoding challenges: czcams.com/play/PLJtzaiEpVo2wrUwkvexbC-vbUqVIy7qC-.html
    ✅✅✅June Leetcoding challenges: czcams.com/play/PLJtzaiEpVo2xIfpptnCvUtKrUcod2zAKG.html
    ✅✅✅May Leetcoding challenges: czcams.com/play/PLJtzaiEpVo2wRmUCq96zsUwOVD6p66K9e.html
    ✅✅✅Cracking the Coding Interview - Unique String: czcams.com/play/PLJtzaiEpVo2xXf4LZb3y_BopOnLC1L4mE.html
    Struggling in a question??
    Leave in a comment and we will make a video!!!🙂🙂🙂

  • @user-sn7gi7tn8h
    @user-sn7gi7tn8h Před 16 dny +1

    Good explaination👏

  • @rohan-rj1ft
    @rohan-rj1ft Před 3 lety

    Perfect explanation! thanks

  • @satyamgupta6030
    @satyamgupta6030 Před rokem +1

    very nice explaination thanks

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

    Thank you for such great explanation and clear approach!!

  • @Piggybacking
    @Piggybacking Před rokem +1

    Thank you so much

  • @malkomeks8456
    @malkomeks8456 Před 2 lety +1

    im so happy to have found this yet im so confused.

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

    Congratulations for the milestone.

  • @Sachin_Alam
    @Sachin_Alam Před rokem +1

    Perfect explanation.

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

    You guys are great!!

  • @Ben-pb7ct
    @Ben-pb7ct Před 2 lety

    Can anyone explain the time complexity in detail of solution 2? From my understanding, I know it is because numbers are 32 bits integer, then worst case time complexity is O(32) which is O(1).

  • @nikhilpoonia8191
    @nikhilpoonia8191 Před 2 lety

    please explain...i am not getting the code dry run

  • @anushkasiddhu9554
    @anushkasiddhu9554 Před 2 lety

    why can't we use the left shift instead of the right shift.

  • @darshanv5200
    @darshanv5200 Před 9 měsíci

    Instead of num & 1, I tried for(i=0; i>>1;} in Java. It didn't work for a few cases. Does anyone know why?

  • @yatinarora1252
    @yatinarora1252 Před 3 lety

    Hii

  • @puspaulmukhopadhyay7794

    why is this code not working ??
    class Solution {
    public:
    int hammingWeight(uint32_t n) {

    int cnt =0 ;
    while (n!=0)
    {
    if(n%10==1)
    cnt++;
    n=n/10;
    }
    return cnt;

    }
    };