201. Bitwise AND of Numbers Range | Remove Last Set Bit | Bit Manipulation

  Рет қаралды 5,674

Aryan Mittal

Aryan Mittal

Күн бұрын

Пікірлер: 22
@rajrajesh1669
@rajrajesh1669 9 ай бұрын
1:20 😂 bro that cracked me up...
@tusharkumarraj6066
@tusharkumarraj6066 2 ай бұрын
loved the explanation. Watched explanation video from neetcode and didnt understand much , this one was so simple and intiutive
@Sakshi-yq4jm
@Sakshi-yq4jm 8 ай бұрын
this was literally the best explanation, i have been trying to understand the reason behind this approach for quite some time now, been surfing youtube all day today. and finally. good work. thank you!
@ARYANMITTAL
@ARYANMITTAL 8 ай бұрын
Glad it was helpful Sakshi 🙇🫡🫂
@aayushyavajpayee4989
@aayushyavajpayee4989 6 ай бұрын
from 8:16 to 8:48, you can avoid that and video will become shorter and crisp. You are doing great
@alifrahman7099
@alifrahman7099 9 ай бұрын
thanks
@ganeshsharma5810
@ganeshsharma5810 9 ай бұрын
amazing approach bhaiya
@sameershah1492
@sameershah1492 9 ай бұрын
Amazing approach ❤
@akhilkarumanchi458
@akhilkarumanchi458 9 ай бұрын
Can you make a video of your day time table ?
@kushal8261
@kushal8261 9 ай бұрын
Yes please!
@Sahilsharma-sk5vr
@Sahilsharma-sk5vr 9 ай бұрын
yes please
@abhinavdubey_7
@abhinavdubey_7 9 ай бұрын
Thankyou my brother amazing.
@shalinijha7359
@shalinijha7359 9 ай бұрын
just thankyou for existinggg
@HarshSharma-hi9vc
@HarshSharma-hi9vc 9 ай бұрын
nice explanation
@codedecode8686
@codedecode8686 9 ай бұрын
nice approach
@learningmaths786
@learningmaths786 9 ай бұрын
Thanks Aryan ❤
@CodeMode9313
@CodeMode9313 9 ай бұрын
badia
@ritishrai581
@ritishrai581 9 ай бұрын
Oh f . I did this using the BIT MANIP trick you taught in one of your previous videos . I guess the tc would still be equal to the no of bits right? #define ll long long class Solution { public: void calcBitRange(vector&bits, int num) { if (num==0) { return ; } if (num==1) { bits[0]++ ; return; } else if (num==2) { bits[0]++; bits[1]++ ; return ; } ll bitLen = log2(num); ll nearPowerOf2 = 1ll =0 ;i --) { bits[i]+= nearPowerOf2 >> 1ll ; } calcBitRange(bits,num-nearPowerOf2); return ; } int rangeBitwiseAnd(int left, int right) { vectorrange1(65,0) ; vectorrange2(65,0) ; if (left==0) return 0 ; if (left>1) calcBitRange(range1,left-1); calcBitRange(range2,right); ll ans = 0 ; for (int i =0 ; i
@whoshyam
@whoshyam 4 ай бұрын
please provide your onenote page link
@parthbhatti4151
@parthbhatti4151 9 ай бұрын
why chatgpt says O(log(right)) time complextiy ?
@sahilkarwani9629
@sahilkarwani9629 9 ай бұрын
if u take the maximum value of right according to question then it will be 2^32 then O(log(2^32)) gives you O(32) which is O(1).
@RachitKumar-yp2ub
@RachitKumar-yp2ub 9 ай бұрын
worst case time complexity is O(32). cause at max we might end up taking 32 traversals.
Noodles Eating Challenge, So Magical! So Much Fun#Funnyfamily #Partygames #Funny
00:33
Молодой боец приземлил легенду!
01:02
МИНУС БАЛЛ
Рет қаралды 2,1 МЛН
Smart Sigma Kid #funny #sigma
00:33
CRAZY GREAPA
Рет қаралды 7 МЛН
How to Fight a Gross Man 😡
00:19
Alan Chikin Chow
Рет қаралды 17 МЛН
Bitwise AND of Numbers Range - Leetcode 201 - Python
18:25
NeetCodeIO
Рет қаралды 14 М.
Bitwise AND of Numbers Range | 2 Approaches | Dry Run | Leetcode 201
34:43
XOR in a range of numbers
9:08
Techdose
Рет қаралды 5 М.
LeetCode Day 23 - Bitwise AND of Numbers Range
12:04
Errichto Algorithms
Рет қаралды 27 М.
TCP/IP for Programmers
3:03:31
Eli the Computer Guy
Рет қаралды 229 М.
Learn these 10 Bitwise Tricks Or Regret Later | Competitive Programming Tricks Part 2
29:26
TLE Eliminators - by Priyansh
Рет қаралды 50 М.
Noodles Eating Challenge, So Magical! So Much Fun#Funnyfamily #Partygames #Funny
00:33