Тёмный
No video :(

Single Number II II 4 -Methods II Bit Manipulation II Leetcode 137 II C++/Java/Python 

Aryan Mittal
Подписаться 46 тыс.
Просмотров 8 тыс.
50% 1

Опубликовано:

 

24 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 50   
@ARYANMITTAL
@ARYANMITTAL Год назад
Don't know what Leetcode smoked before placing this question in a Medium Category 🥵!! Checkout DSA-169 Series: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-5BuKVS-Vnws.html Problem Link: leetcode.com/problems/single-number-ii/description/ Code & Notes: drive.google.com/file/d/1-f0XzUitIZ-U0ieKkomuyK_xUhulAttG/view?usp=sharing
@gouthamp9066
@gouthamp9066 Год назад
One of the best best RU-vidr who can explain any hard problem easy thanky Aryan we will remember you for ever because your making our lives better
@sherlockjunior8612
@sherlockjunior8612 Год назад
I guess, at 7:44 you mean to check 3*1e4 for N and not 2^31 because the N is the size of the input, not the range of numbers...
@monty6393
@monty6393 Год назад
Yeah exactly
@shreyanshthakur5405
@shreyanshthakur5405 Год назад
After looking Leetcode solutions section and not understanding the intuition behind the bit manipulation approach, I came here and simply got the intuition behind that very easily. Thanks a lot for explaining the links and thought process Aryan!!!
@santoshprasadyadav2198
@santoshprasadyadav2198 2 месяца назад
Loved the way you explained bro, best video for this question i found so far!!
@oqant0424
@oqant0424 Год назад
beautifully explained.......................the only person on the whole internet who teaches how to build the solution❤❤
@jamjam3448
@jamjam3448 2 месяца назад
My favorite man. Thanks, man
@bkmeher9005
@bkmeher9005 6 месяцев назад
Great bhai
@aftabrahman5863
@aftabrahman5863 6 месяцев назад
great work
@shashikiran5385
@shashikiran5385 2 месяца назад
you're underrated
@raftywate
@raftywate Год назад
Thank you, Aryan! It's a beautiful video. Helped me improve my thought process. Glad that I came across your channel.
@nikhilbabar2226
@nikhilbabar2226 Год назад
Why the solution 3 doesn't work for negative numbers
@JihadIsmail
@JihadIsmail Год назад
Thank you so much, I have been looking for the last approach explanation specifically for the last 3 days. Your way of explaining the things and your passion are amazing.
@noobplays6673
@noobplays6673 Год назад
class Solution { public: int singleNumber(vector& nums) { int ones=0, twos=0; for(int n: nums){ ones = (ones ^ n) & ~twos; // frequency is 0 and not 2 twos = (twos ^ n) & ~ones; // frequency is 2 and not 1 } return ones; } };
@worldfromhome4033
@worldfromhome4033 Год назад
Nice idea of encapsulating the set bits that have come once and twice and then modifying them🔥
@midas8003
@midas8003 Год назад
Loved the approach bro !
@NihalSingh-ld2en
@NihalSingh-ld2en Год назад
did you tried to submit your 3rd intution code ? as the number can be negative this intution will not work
@nikhilbabar2226
@nikhilbabar2226 Год назад
Yes, it is not working for negative numbers
@jayantsahu6792
@jayantsahu6792 Год назад
class Solution { public: int singleNumber(vector& nums) { int n = nums.size(), ans = 0; for (int i = 0; i < 32; i++) { int sum = 0; for (int j = 0; j < n; j++) { sum += (nums[j] >> i) & 1; } sum = sum % 3; ans = ans | (sum
@tejuschaturvedi6234
@tejuschaturvedi6234 Год назад
Mind blowing explanation 💫. The last approach is so amazing . You are very good at this explanatory work . ❤
@rishabhgupta9846
@rishabhgupta9846 Год назад
Thanks for the video
@nadeking1530
@nadeking1530 Год назад
You earned a sub ! Kudos to your hard work !!!
@rohanpradhan3160
@rohanpradhan3160 Год назад
Loved the approach and how you got to it.. Loved it Thanks......
@BiswajitDas-lk7pp
@BiswajitDas-lk7pp 6 месяцев назад
Best Explanation but sound is not Clear
@iWontFakeIt
@iWontFakeIt Год назад
Last approach was ❤
@AanganwadiGuriya
@AanganwadiGuriya 11 месяцев назад
It was nice one !
@kale-lb5pr
@kale-lb5pr 5 месяцев назад
how bit manipulation is taking place pls help im doing dr and run im not getting?
@kale-lb5pr
@kale-lb5pr 5 месяцев назад
i have one question like i was doing dry and run on array [5,5,5,6,4,4,4] after when array element first 4 comes if gtes xor with what ones contains so it technically has 6 bcoz it occured ones then when we xor 6^4 it will not remain 6 pls tell me what im doing wrong something is off i cant pinpoint pls help folks!!
@kale-lb5pr
@kale-lb5pr 5 месяцев назад
array needs to be sorted i guess
@pindersingh4924
@pindersingh4924 Год назад
i start my day with solving leetcode problem of the day , and then during breakfast i watch your solution video , love your videos.
@nikeshmali8506
@nikeshmali8506 Год назад
thanks.
@arihantjainajbil8182
@arihantjainajbil8182 Год назад
approach 4 is lit
@a.y_u.s_h
@a.y_u.s_h Год назад
salute
@saunaknandi1814
@saunaknandi1814 Год назад
Aryan can u make complete video dedicated to bit manipulation?
@45_ritiksharma32
@45_ritiksharma32 Год назад
Please solve longest palindromic subsequence leetcode -2484
@kale-lb5pr
@kale-lb5pr 5 месяцев назад
#include using namespace std; int singleNumII(vector a,int n) { int ones=0,twos=0; int i; for(i=0;i
@kanishparihar5497
@kanishparihar5497 Год назад
class Solution { public: int singleNumber(vector& nums) { int ans = 0; for(int i=0;i
@GOLUKUMAR-zi9nv
@GOLUKUMAR-zi9nv Год назад
It doesn't work for negative numbers
@jayantsahu6792
@jayantsahu6792 Год назад
class Solution { public: int singleNumber(vector& nums) { int n = nums.size(), ans = 0; for (int i = 0; i < 32; i++) { int sum = 0; for (int j = 0; j < n; j++) { sum += (nums[j] >> i) & 1; } sum = sum % 3; ans = ans | (sum
@user-no5mo9jv5m
@user-no5mo9jv5m Год назад
too much for me ! 😢
@harsh8174
@harsh8174 Год назад
forrr 22222
@tejaspatel2212
@tejaspatel2212 Год назад
38 min video 🤦🏻‍♂️. Who's gonna waste time.. why can't you make under 20 min video or split the video
@peachpink2831
@peachpink2831 Год назад
why can't you check timestamp and skip to the part u need, you don't need to watch all 4 approaches
@kartikeyrana3736
@kartikeyrana3736 Год назад
same lol, i'm waiting for neetcode to start uploading again, till then will have to make do with him.
@noobnessmee
@noobnessmee Год назад
he can just cut his overactting and video would be 20 mins lol
@rohanpradhan3160
@rohanpradhan3160 Год назад
Why are you saying that? If you don't enjoy it, simply choose not to watch it. You may inadvertently demotivate him from creating more content.
@harshal8781
@harshal8781 Год назад
@@noobnessmee it's very easy to say anything about anyone, you should thanks him for such unique content on YT which no one explains the concept in such depth (and that you also know that's why you are here watching his videos 😛). It's easy to comment on someone, try it on your own you will realise it. And his expressions speaks how much dedicated he his with his work.✌️
Далее
L6. Single Number II | Bit Manipulation
31:19
Просмотров 39 тыс.
Recursion in Programming - Full Course
1:51:36
Просмотров 941 тыс.
Single Number II | 4 Methods | Leetcode #137
14:04
Просмотров 69 тыс.
I FOUGHT A BOT STRONGER THAN MITTENS!!!!
26:44
Просмотров 185 тыс.