this should be HAAAARD! No way I could solve this in an interview without some hints.
@NeetCodeIO4 ай бұрын
yeah it's pretty tricky dicky
@stoppls17094 ай бұрын
@@NeetCodeIO💀
@NitinSinghMinVlogs4 ай бұрын
@@NeetCodeIO "dick"y
@brij48874 ай бұрын
𝓕𝓻𝓮𝓪𝓴CodeIO
@imrozkhan714 ай бұрын
@@brij4887 lmaooo
@RockStarPunk04 ай бұрын
19:28 thanks for remainding me
@mohammadaminkhaje82244 ай бұрын
girlfriend -> doesn't make you better leetcode neetcode -> makes you better at leetcode conclusion: neetcode wins
@Tab-It4 ай бұрын
Make neetcode your girlfriend
@sudesh68074 ай бұрын
Good. now are expert at leetcode and u will die single
@pravyn3504 ай бұрын
Yeah 😂
@sidazhong2019Ай бұрын
girlfriend makes you worse at leetcode
@harshitjain88204 ай бұрын
Didn't even had to watch the coding part, just soo good! 🔥🔥🔥🔥
@attilauhljar36364 ай бұрын
This should definitely be a hard problem, no way I'd come up with this solution on the spot, and i started with assembly back in the days. Thanks for the great and clear explanation, as always
@baetz24 ай бұрын
19:28 My wife doesn't allow me to have a girlfriend, so I'm watching
@mohd.tabishkhan48684 ай бұрын
man you gotta do leetcode even after marriage, damn i am sad now. Life is hard im just in college rn
@ewiz_02624 ай бұрын
No way
@vrajrana21754 ай бұрын
19:28 trolled me : ❌ Trolled Himself : ✅
@minaFbeshay4 ай бұрын
23:48 you can even remove the "else" keyword, after swapping the two conditions for (int i =0; i< s.length(); i++){ char c = s.charAt(i); mask = mask ^ vowels.getOrDefault(c, 0); if (map[mask] == -1 && mask != 0) map[mask] = i; ans = Math.max(i - map[mask], ans); }
@guitarfanatics774 ай бұрын
@NeetCodeIO this is so hard for someone like me who never solve a bitmask problem before, and I just checked the problems with bitmask tag on leetcode and they are all medium difficulty. Is there any easier problem for noob like me to practice bitmask?
@NeetCodeIO4 ай бұрын
Here's one we solved this week: kzbin.info/www/bejne/eXfEY4edfq2AhJI
@aryansuvarna49234 ай бұрын
what an insane solution. well played
@sauravsingh44974 ай бұрын
thank you i would have never got the solution if it wasn't for you
@ihor42564 ай бұрын
if someone asks you to use bit operations in an interview - they don't want you to work there
@DhanushBRaj4 ай бұрын
From 19:28.... I'm still watching in loop...!
@harshugamer77764 ай бұрын
19:24 , I am watching
@shauryatomer10584 ай бұрын
thanks for this great explanation
@MP-ny3ep4 ай бұрын
Thank you so much !
@darshanrokkad52164 ай бұрын
thank you
@IamAbhiinav4 ай бұрын
LeetCode cooked with this one
@matalamedo4 ай бұрын
For all of y'all who feel bad for being unable to solve this one, don't. This should've been a hard problem.
@StellasAdi184 ай бұрын
Surely this is hard
@sauravsingh44974 ай бұрын
i tried the sliding window solution by storing the rightmost index of every vowel in the string but it didn't work
@NeetCodeIO4 ай бұрын
yeah i believe i explained why it doesnt work
@sauravsingh44974 ай бұрын
@@NeetCodeIO yep thank you for such a great explaination
@khatora4 ай бұрын
can anyone explain how this is right mask^=(1+ord(c)-ord('a)); I think it should be like this flib the bit corresponding to the character mask ^= (1
@taozhaojun4 ай бұрын
I don't have a girlfriend🤣
@NeetCodeIO4 ай бұрын
that's why i'm here friend 🫂
@taozhaojun4 ай бұрын
it is more clear to write mask ^= (1
@NeetCodeIO4 ай бұрын
damn you're write, clever.
@pravyn3504 ай бұрын
@@NeetCodeIO😂 can you act as my GF too !
@rajsuriyang34274 ай бұрын
i've no idea. I don't think i can get to FAANG.
@testAccount-eb2ve4 ай бұрын
Right now you may not, but with patience and practise you can 😃
@NandanUpadhyay-w2f4 ай бұрын
Can we actually code hashMap soln ??
@NeetCodeIO4 ай бұрын
Yeah but would probably need to serialize the hashmap into a string. Also should probably just use a hash set rather than a map, I just drew a map because the mapping makes it easier to visualize
@elmirshidev4 ай бұрын
I have a gf that is why I did not look at the second solution,thanks Neetcode
@NeetCodeIO4 ай бұрын
My man
@buckwheatplate87704 ай бұрын
I'm gonna have a long walk after this...
@venkatgaddam65874 ай бұрын
This is definitely not a medium question!!!.
@romanivanov61834 ай бұрын
Why do we need this bitmask? Why not just simple dictionary?
@BootBoot-rl1kv4 ай бұрын
day by day why coders are becoming trollers
@NeetCodeIO4 ай бұрын
Solving these gets boring sometimes, just trying to entertain myself tbh
@BootBoot-rl1kv4 ай бұрын
@@NeetCodeIO 😂😂 i understand
@ChetanAnnam4 ай бұрын
Most confusing and difficult
@shikher45594 ай бұрын
I watched the complete video which means i dont have a ....
@ewiz_02624 ай бұрын
Nah, I'd leave
@yang58434 ай бұрын
Don't see why people are calling this problem a hard, you can use prefix sum and solve this as a medium at best
@thepriestofvaranasi4 ай бұрын
Can you please elaborate on how prefix sum is used for this problem? Thanks.
@yang58434 ай бұрын
@@thepriestofvaranasiso you iterate left to right for each char of the array, if you are currently at an odd number of vowels, and you encounter the same set of odd vowels before, then you know odd - odd = even, I'm simplifying my explanation a bit but you're basically keeping track of the occurrences of each vowel as you iterate through the array
@hadizorkot28894 ай бұрын
@@yang5843so basically what he just explained but worse
@pruthvinarayana95684 ай бұрын
hey Neetcode , why do you look like an indian?
@NeetCodeIO4 ай бұрын
that's a LC easy.. I'm sure you can figure it out :)
@pruthvinarayana95684 ай бұрын
@@NeetCodeIO Huge respects , Thanks for carrying us ❤
@immortal40914 ай бұрын
Neetcode -> If you don't have a girlfriend, keep watching Me -> Watching bro, you don't have to point it out🥲🥲