Sir you are doing great job for students those who can't afford online courses.I hope that your channel will grow fast
@WhATtHeFOX-qg2ig3 ай бұрын
After getting worried for 30 mins..... finally got an amazing explanation..
@vbv.bhardwaj10 ай бұрын
left shift dekne aay atha bs pe itna sb btadia, tq bro
@kanhamishra16304 жыл бұрын
A serious request to everyone who comments.. Please ask doubts.. You know it is a huge blessing to have Sumeet Sir guiding like this.. Please share the channel.. It's a request from me, one of his student.. Sir will also feel motivated to upload new new content everyday then.
@Pepcoding4 жыл бұрын
i am always motivated for this
@0_0-0_0.3 жыл бұрын
bhai jisne bhi dislike kiya hai o bilkul nark jayega. itni golden content pe dislike koun karta hai yar. thank you o much sir for this great content.
@Pepcoding3 жыл бұрын
Haha Glad to know that you liked the content and thank you for appreciating. The love and respect which I get from you people keep me highly motivated and the same I am able to forward It to you people through my videos. So, keep motivating, keep learning and keep loving Pepcoding😊
@deepak-pb2xt9 ай бұрын
0 is the exception. Well, great content tbh. tysm
@faizan3463 жыл бұрын
one correction it will give true even if the number is n = 0, which is not the power of 2 so, return (x && !(x&(x-1))); this will check for 0 and power of 2.
@ritiktwopointo26914 жыл бұрын
bits manipulation is really maical :) thanks again sir
@Pepcoding4 жыл бұрын
ji, padhte rahie. aj se level2 ki dp start hogi
@anjandey60893 жыл бұрын
we have to add this condition also; if(n==0) System.out.println("NO);
@GhostKiller91003 жыл бұрын
thank you
@ayushgoel95844 жыл бұрын
Sir completed 30 questions of dp foundation today, alag level ka confidence aa rha hai sir, Mazza alag aa rha hai pehli Baar padne mein, meine toh Apne next 4-5month pepcoding ke Naam kar diye, job thoda late kar lenge(2020 passout)
@Pepcoding4 жыл бұрын
aj se level2 ki DP shuru hogi. usko bhi kijie. usme 120-170 ques daalunga. uske baad DP kabhi preshan nahi karegi, kahin ki bhi ho.
@ayushgoel95844 жыл бұрын
@@Pepcoding sir mera foundation ka graphs reh gya Abhi, toh usko Baad mein Karoo, pehle level2 ki dp start kar do, graphs ki jaroorat toh nhi padegi Abhi dp mein
@Pepcoding4 жыл бұрын
nhi nhi nhi. graphs to abhi karo, levelup ki dp mei shuru mei he graph use hoga.
@shivasharma17744 жыл бұрын
what is DP?? 🙄
@aman65614 жыл бұрын
@@shivasharma1774 Dynamic programming
@Abhishekkumarnjw22-vf7cr4 ай бұрын
Outstanding
@vedantagarwal223 жыл бұрын
Great explanation sir , in all videos , thankyou !!!
@creativeeducator4225 күн бұрын
Thankyou Sir ❤️
@shubhamsood14064 жыл бұрын
Another approach is to count Set Bit and if set bit == 1, then it is a power of 2 else not a power of 2.
@suyashlale73152 жыл бұрын
but that would be O(log n) instead of O(1).
@rohita6532 Жыл бұрын
@@suyashlale7315 just removing rmsb will also work, if it becomes zero it's true but in both approaches, we should check if the given number is zero or not if it is zero both approaches give true but it is not so a simple check in the starting would work there
@ShubhamKumar-km8pm Жыл бұрын
Thanks sir🔥
@anishchauhan26473 жыл бұрын
thanks sir this helps me a lot
@AkashGupta_youtube2 жыл бұрын
this logic is not working for 0
@rahulbhatia30754 жыл бұрын
Good explanation 🔥
@Pepcoding4 жыл бұрын
Padhte rahie
@nishthagoyal50184 жыл бұрын
Thankyou sir
@thakurjigupta10933 жыл бұрын
n=0 dalne vala case kaise handle kare
@kushaldulani4 жыл бұрын
Sir aapke yaha offline classes kab start hone k plan he ? Live me vo maja nahi jo aapke yaha delhi me center me padhne ka he
@Pepcoding4 жыл бұрын
hum to bilkul chahte hain par jab tak government allow nahi karegi, tab tak kya karein
@mickyman7533 жыл бұрын
rightmost set bit minus krne pr 0 ho jae toh power of two
@bradbale15104 жыл бұрын
Sir, im from mech branch. I've switched my career direction to IT and i am following pepcoding. Currently in 4th yr, unable to handle college subjects and minor project and coding together. was thinking to drop out(but bina degree ke job nahi), so just seeking suggestion as what to do? :)
@Pepcoding4 жыл бұрын
bro, degree lelo jaise taise. System se itni ladai na karo. Ek cheez ka vishwash dilata hun, agar tumne 4th year mera sara youtube content kar lia to tumhe amazon mei place karana mai apni zimmedaari samjhunga. Aise ek DTU ka civil ka bacha amazon mei place kra chuke hain hum. Pepcoding ka sara youtube chaat jao, usme DS bhi ho jaegi, CORE bhi aur computer science ke projects bhi.
@bradbale15104 жыл бұрын
@@Pepcoding Thank you for showing me the way Sir. I cant thank you enough
@jitenderyadav7214 жыл бұрын
Sir apka code 0 ke liye fail ho jata hai Aur na hi apke test case me voh pakdta hai 0 wale case ko