201. Bitwise AND of Numbers Range (Solution Explained ) - LeetCode JAVA/C++ | BitWise- #04

preview_player
Показать описание
It's always best to learn one at a time and then all together

Use code for 10% off on GFG : "AKSHAYS10"
----------------------------------------------

Other Social Media
----------------------------------------------
Instagram

Happy Coding 🤝

#AkshayAnil #dsa #dsa_with_akshay #dsasheet #programming #gfg #gfgpotd #problemsolving #coding #softwareengineer #faang #amazon #microsoft #competitiveprogramming #dsasheet #interviewpreparation
Рекомендации по теме
Комментарии
Автор

seeing this optimized approach for first time quite difficult to get resolve that this is the solution . but after more dry run it is now crystal clear

Raj
Автор

class Solution {
public int rangeBitwiseAnd (int left, int right){
while(right>left)
right=right &(right-1);
return right;
}
}

dayashankarlakhotia