Number of 1 Bits | Live Coding with Explanation | Leetcode - 191
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
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!!!🙂🙂🙂
Good explaination👏
Thanks for liking
Perfect explanation! thanks
very nice explaination thanks
You are most welcome
Thank you for such great explanation and clear approach!!
Happy to help !!
Thank you so much
You're most welcome
im so happy to have found this yet im so confused.
Congratulations for the milestone.
Thanks Ramarao!! 🙂
Perfect explanation.
Thank you!!!
You guys are great!!
Thanks Pramod!! 🙂
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).
please explain...i am not getting the code dry run
why can't we use the left shift instead of the right shift.
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?
Hii
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;
}
};