Single Number III - Leetcode 260 - Python
🚀 neetcode.io/ - A better way to prepare for Coding Interviews
🧑💼 LinkedIn: / navdeep-singh-3aaa14161
🐦 Twitter: / neetcode1
⭐ BLIND-75 PLAYLIST: • Two Sum - Leetcode 1 -...
Problem Link: leetcode.com/problems/single-...
0:00 - Read the problem
1:30 - Drawing Explanation
9:17 - Coding Explanation
leetcode 260
#neetcode #leetcode #python
Пікірлер: 49
I don't like bit manipulation at all
@viveksoni3269
Ай бұрын
Bit manipulation is awful!
@reactionchamber
Ай бұрын
same here
@brij4887
Ай бұрын
Do you hate it more than dynamic programming? I can some what come close to a solution for bit manipulation problems but I can't understand dp solutions even after watching the explanation multiple times.
@AnordinaryMan007
Ай бұрын
@@brij4887 Na bro dp is much better than this.
@brij4887
Ай бұрын
@@AnordinaryMan007 to be able to solve dp problems on my own do I need to solve enough problems in order to reach the moment where it all clicks? Do you have any suggestions?
these are interesting questions, however bit manipulation questions just feel like one trick pony solutions (much like greedy). interesting but not satisfying sadly.
@NeetCodeIO
Ай бұрын
I agree, I don't think I've ever been asked bit manipulation in an interview. Has anyone here been asked it?
@PanicAtProduction
Ай бұрын
Do you think blind-75 and neetcode-75 are still solid??
@venkadeshb7973
Ай бұрын
@@NeetCodeIO Not in interviews but in most of the OA's
@samarth_suthar_
Ай бұрын
@@NeetCodeIO i think that it is more relevant to embedded system role's interview(close to electronics role).
@ap2s2000
Ай бұрын
@@NeetCodeIO I've had experience with Apple asking bit manip
You flipped the 3 and 5 in a and b.. But the concept is clear.. Thanks neetcode!
@NeetCodeIO
Ай бұрын
Good catch, yeah thats my mistake. It would technically still work tho, so hopefully its not too confusing
@aashishbathe
Ай бұрын
@@NeetCodeIO yess it still works. Awesome solution man. I can never think of such a solution ever 😂
@LotsOfFunyoutubechannel
Ай бұрын
Had to rewind back multiple times but the grouping still didn't make sense. This comment cleared my doubt. Should have been the top comment😅
The a-ha moment is the grouping concept. Feel depressed even practicing more than a thousand of LC, still can not get it in an hour and open YT to watch your solution like I did 4 years ago. (BTW, we can use xor & -xor to find the right most set bit of xor) Appreciate your explanation as usual.
This is really a tricky one. Your explanation is so much better. Thank you so much. Finally, I got 'May' badge in leetcode.🎉
Your explanation is amazing. Thanks!
Hey Navdeep, first of all a huge thank you for making videos and helping us throughout the journey of DSA. I would like to request you to make LC bi weekly and weekly contest solutions as well. The questions in contests contain different gravy and it'll help us be more prepared for interviews... Cheers🎉
Thank you very much neetcode ❤
Great explanation
Tricky problem but your solution made it look very easy. Thank you
This is the best explanation I was able to find. Thanks NeetCode.
So much crystal clear explanation . Really in love with you ❤
The concept is understandable but to come up with the solution is almost impossible, thank you for the explanation it's the clearest one on youtube.
Not gonna lie I don’t think I can come up with this solution in an interview
Nice!
wow i was looking for it
splendid logic (in depth know how of Bitwise Operations)
I would never have thought to use bit manipulation here
I hope no one ever asks bot manipulation in an interview, and the only one who ever has to use it, be the compiler🙏
I like your solution, even it makes me feel bad of myself because I will never come up with this myself 😢
Bit Manipulation questions are haunting DCC!!!
That's quick mate 😂
class Solution: def singleNumber(self, nums: List[int]) -> List[int]: xor,a,b = 0,0,0 for i in nums: xor^=i diff = xor & -xor for i in nums: if diff & i: a^=i continue b^=i return [a,b] A better solluiions
what drawing software do you use?
bro we need 137 single number ii two bucket approach in your way of explanation please , i can't found your video for that problem
I feel Navdeep = Srinivasa Ramanujan junior
I have a Microsoft technical interview for a software engineer on 12th and 13th june. I started leetcode last week, any tips to clear the interview, since i would only have like 2 weeks of leetcode practice.
can you solve path sum 3 please
just tell me from where have you learnt to build intuition?
leetcode 2035 ,if possible can u able to make a video for this problem ?