1915. Number of Wonderful Substrings | Bit Manipulation | Bit Masking | XOR | De-shaw

  Рет қаралды 9,087

Aryan Mittal

Aryan Mittal

Күн бұрын

In this video, I'll talk about how to solve Leetcode 1915. Number of Wonderful Substrings | Bit Manipulation | Bit Masking | XOR | De-shaw
Let's Connect:
📱Discord (Join Community) : / discord
📝Linkedin: / aryan-mittal-0077
📸 Instagram: / ez.pz.dsa
💻 Twitter - / aryan_mittal007
🤖 Github: github.com/ary...
About Me:
I am Aryan Mittal - A Software Engineer in Goldman Sachs, Speaker, Creator & Educator. During my free time, I create programming education content on this channel & also how to use that to grow :)
✨ Hashtags ✨
#programming #Interviews #leetcode #faang #maang #datastructures #algorithms

Пікірлер: 90
@ARYANMITTAL
@ARYANMITTAL 5 ай бұрын
Okay so, firstly this problem is actually tricky, so don’t feel demotivated ! . Secondly if anyone feels like, this was a big video with contents not required or making it confusing, do let me know if something was extra which i told which was already known to you guys or i repeated something extra, or the flow was not correct, or did we not get intuition of why & what at every point. . Your feedback is very important for great short videos, i’ll try to make short videos & stick to only problem as much as possible, considering what most of you will demand. ❤️🫂 . . . Hindi Channel for guidance & LiveStreams (Interviews & Resume Review) - kzbin.info/www/bejne/hnjUgH2iq5WJm7ssi=o6vQaUAtSiUdlITM . 📱Discord (Join Community) : discord.gg/vwUAz2pEHZ
@ashishkhurana5653
@ashishkhurana5653 5 ай бұрын
Bhaiya whenever there is any bit manipulation concept please focus more on that part.
@ARYANMITTAL
@ARYANMITTAL 5 ай бұрын
Okay, after watching those 4 confusing comments, I went onto youtube to look for how others are explaining & found one video which most like rate so far, in that the person in starting 10mins of video after brute force directly jumped onto to using XOR and telling how to use XOR to solve the answer. . . And strangely, people are liking this also, and then the person went on dry running and showing why this xor approach is correct & why this will work by dry running. . . We on other hand build this entire problem from bottom up & in end realised that for our usecase, xor could have acted as a helper. I am not saying i am best, i know, i speak fast & tell a lot of thinks which people don't want to know. . . But if you watch the videos as mentioned above & think you understood the problem, this is the biggest mistake. This gives you a dopamine hit because the person dry ran 10 times infront of you, was the concept told to you GENERIC ?? . . Not bashing anyone, everyone has their pros & cons, me too. [I don't know why i wrote an essay here 🥲]
@ayaaniqbal3531
@ayaaniqbal3531 5 ай бұрын
​@@ARYANMITTAL Aryan Bhai your efforts made me understand this problem.
@kajiazadali7738
@kajiazadali7738 5 ай бұрын
bhaiya ap pahale se sab kuch mat likha karo. at least dry run ke time likhkar samjha sakte ho ap..
@amansingh7965
@amansingh7965 5 ай бұрын
Bro it was nice explanation , can you include dry run too?
@topsy_kreds
@topsy_kreds 5 ай бұрын
Hard to listen and understand. It is not about how much you talk bro, it is about what you put in it.
@abhishekshukla5747
@abhishekshukla5747 5 ай бұрын
I actually agree he says a lot of stuff yr irrelevant
@dion9795
@dion9795 5 ай бұрын
😂😂😂😂😂😂
@mohdkhaleeq7468
@mohdkhaleeq7468 5 ай бұрын
aryan you are doing good work. One feedback will you make video length smaller
@HARSHSHARMA-ke4jg
@HARSHSHARMA-ke4jg 5 ай бұрын
bhai your content is good, but this video is confusing
@VG-xi7iq
@VG-xi7iq 5 ай бұрын
Hi Aryan, you are an exceptional problem solver. Got some feedback for you ... - explain the concepts stepwise, instead of explaining randomly and it should be a bit short. - do a quick dry run of the algorithm. - spend most of the time in explaining how every line of code maps to concepts you explained. Thank you broski ...
@zweitekonto9654
@zweitekonto9654 5 ай бұрын
The last point is a must for full understanding. And no one actually covers it that well
@ayaaniqbal3531
@ayaaniqbal3531 5 ай бұрын
Aryan Bhai the explanation was Amazing .just wanted to ask that if it is possible then try to do dry run of the code it will give us more Clarity .Keep Growing😀
@agx1397
@agx1397 5 ай бұрын
Overall a good video!. I already came to the conclusion of using hashmap+prefix sum+bit mask, but was not able to think of the "target" to search in the hashmap for current index i, that the target can be a set of possible outcomes ( 11 patterns in this case ). PS - I saw many comments saying explanation not clear, if being honest the intuition for prefixSum+hashMap was not explained very well i.e (the blue , white, pink part).
@gajjalaharsha
@gajjalaharsha 5 ай бұрын
There can be 26 characters from 'a' to 'z' but why we are checking only from 'a' to 'j' and not from 'a' to 'z' can you explain @aryan mittal
@sivalokesh3997
@sivalokesh3997 5 ай бұрын
You are doing amazing work! Sometimes explinations cannot be perfect but it is ok. I have some idea on the approach (similar to no of subArrays target sum problem). One needs to refer this problem & comeback if not understood by them.
@codingkart245
@codingkart245 5 ай бұрын
can you please let me know which mic you're using for recording videos?
@zweitekonto9654
@zweitekonto9654 5 ай бұрын
this looks like it can be very easily extended to all lower case letters (a-z) why only stop at 10 letters (a-j)?
@A_Myth963
@A_Myth963 5 ай бұрын
Great Explaination bro...took some time to understand but you made it really easy with those extra effrot that you put🤟
@soubhagyabehera1654
@soubhagyabehera1654 5 ай бұрын
Good understandable 👍
@alialrafei
@alialrafei 5 ай бұрын
the problem got so messy as we move forward what exactly the white and the blue region and in the code u just keep track of the hole pink region and at every index i you check for the if we can make the odd variant of the pattern what is ur proof that the current pattern is the even one not an odd one and when u enter the loop u check for all odd i want a clear explanation if possible
@priyak-vo7uu
@priyak-vo7uu 5 ай бұрын
you make good vedios i really appricate that but its bit confusing for tricky problem , you can use examples to explain the problem so that we can also image how its working
@kyo1844
@kyo1844 5 ай бұрын
What application do you use to write?
@vijayj1997
@vijayj1997 5 ай бұрын
Connecting the concepts randomly Having hard time to understand the video. Came here to undertand the problem and you made it even more difficult Your Effort was awesome but consider all type of audience. Please watch take u forward, neetcode or techdose how crisp the content is.
@IK-xk7ex
@IK-xk7ex 5 ай бұрын
Thank you for explanation!
@astitwapanwar9621
@astitwapanwar9621 5 ай бұрын
aryan bhai u r consistent that is great but you should try to explain stepwise and your r confusing too but i hope you will work on that may you grow exponentially
@janardhan1853
@janardhan1853 5 ай бұрын
Thanks aryan bhai for providing a detailed explanation ❤❤❤ it was a bit confusing at starting while introducing optimised approach after that i understand well and provide some other questions and their solutions on this type of concepts so we can practice and solve even new problem will occur
@ParasMoonEEE
@ParasMoonEEE 5 ай бұрын
Very helpful ❤
@bhausaheb213
@bhausaheb213 5 ай бұрын
Bro your efforts are really great..👍 But keep explanation simple so each can understand
@sourabhsingh4810
@sourabhsingh4810 5 ай бұрын
bhai samjh aaya but very confusing bhut messy ho jata h thoda slow bhi ho sakta h
@ToraTulsi
@ToraTulsi 5 ай бұрын
ar time @05:57 bro say maqsad nahi bhulna 🥲
@_rajput._0x.297
@_rajput._0x.297 5 ай бұрын
Bro u just nailed it. Good job
@prakharojha8688
@prakharojha8688 5 ай бұрын
My guy the discord invite has expired...
@Anonymous-lb6mc
@Anonymous-lb6mc 5 ай бұрын
Please check the issue on the mic, when you are seeing down your voice is not clear.
@DreamFist
@DreamFist 5 ай бұрын
can someone please explain how subtraction is same as xor ,for eg. 0000 - 1000
@developertutstelugu1.3lakh77
@developertutstelugu1.3lakh77 3 ай бұрын
No, they're not!
@ashisranjandey7541
@ashisranjandey7541 5 ай бұрын
Good explanation!
@sujalgupta6100
@sujalgupta6100 5 ай бұрын
Shouldn't the first brute force approach take O(n3 * unique keys in map) complexity and second brute force O(n2 * unique keys in map)
@ARYANMITTAL
@ARYANMITTAL 5 ай бұрын
What is size of map bro? And what is complexity of map?🌚🫂
@sujalgupta6100
@sujalgupta6100 5 ай бұрын
@@ARYANMITTAL bhai ye to nahi keh skta mai, ye depend krega jo substring ban rhi hai uspe. But it should take some time process that map.
@astrid_6622
@astrid_6622 5 ай бұрын
aryan u seem psychotic , just kidding u are so amazing at this i can neverrr😭
@satwiktatikonda764
@satwiktatikonda764 5 ай бұрын
i dont why but after many months of ur vids for the first time i feel like this is confusing
@ARYANMITTAL
@ARYANMITTAL 5 ай бұрын
What portion was confusing bro?? 🥲 . . On a few places while going in the flow, i had taken a pause & diverted to some if conditions that might occur as WHY in someone’s mind, then came back to the actual flow to continue further, to not just tell the approach & finish off the video, i realise many people don’t think that much, thus they don’t have that many doubts & thus straight forward approach is the best for these tricky problems. . . And as someone mentioned below about why i changed mask from b to c, was while giving example of b, it will be very specific giving all 00000s, while i always try to make sure that we build generic examples & that also I recommend to everyone, but yeah those if else, this that, can be a lot for beginners. . . But yeah Satwik bro, do let me know on what point aap confuse ho gye, even the time stamp will work, we’ll improve, so the video covers wide range of people’s understanding❤️
@sainaidu5725
@sainaidu5725 5 ай бұрын
Your video is not understanding 😢
@mrExplainer4004
@mrExplainer4004 5 ай бұрын
Maqsad nahi bhulneka bhai 😢
@Noob_Coder1234
@Noob_Coder1234 5 ай бұрын
Whenever i tries to build confidence , leetcode destroys it🙂
@ARYANMITTAL
@ARYANMITTAL 5 ай бұрын
💀💀🥹
@sasankav.8420
@sasankav.8420 Ай бұрын
Hey Aryan, No questions on your understanding of the problem. However, I must say it was a frustrating experience going through your explanation. Firstly, try breaking the problem into subproblems, and maybe try explaining each subproblem individually. Second, repetition may help while explaining someone in person, but it is something I prefer not to go through in a YT video. If I wish to listen again, I can simply nav back to your explanation. Third, please explain the problem to a friend before making a video, and take some feedback. I m sure that might help fine-tune your explanation. Otherwise, I checked your Linkedin profile and you have an impressive profile. Good luck with your videos henceforth! I hope my feedback may contribute to your teaching skill
@deepbhut22
@deepbhut22 5 ай бұрын
just code along with the video, that would be very good
@ShubhamSingh-ud1mw
@ShubhamSingh-ud1mw 5 ай бұрын
Aryan bhaiiii maksad nhi bhulenge chahe jo ho 😂😂; nice explaination btw
@AryanRaj-rc3yr
@AryanRaj-rc3yr 5 ай бұрын
Bro code samajh mei aagya lekin intuition samajh nhi aaya. I prefer ki thoda sequence leke chalo intuition samjhate time. messy ho jata hai
@vibhanshusharma9143
@vibhanshusharma9143 5 ай бұрын
Mera 2 bit ka microprocessor(brain) hang ho gaya 😢 kese kese question bna rakhe h 😶😶
@ARYANMITTAL
@ARYANMITTAL 5 ай бұрын
Yaa this one is actually tricky🥹🫂
@uday_berad
@uday_berad 5 ай бұрын
Nice Explanation 🔥🔥
@ARYANMITTAL
@ARYANMITTAL 5 ай бұрын
Koi bhi doubt toh nhi reh gya naa bro? 🫂
@uday_berad
@uday_berad 5 ай бұрын
@@ARYANMITTAL all doubts are cleared i saw lots of leetcode solution in leetcode discussion but can't understand , but you teach very well and how you approach the problem is just wow.
@nocodelimits
@nocodelimits 5 ай бұрын
Aarya bhai uthne ka aur soone ka schedule
@ARYANMITTAL
@ARYANMITTAL 5 ай бұрын
Sota nhi ho bro 🌚🗿
@nocodelimits
@nocodelimits 5 ай бұрын
@@ARYANMITTAL dangerous manus haii tu
@nagasrisaichaitanyakolluri8173
@nagasrisaichaitanyakolluri8173 5 ай бұрын
Thanks bro
@ARYANMITTAL
@ARYANMITTAL 5 ай бұрын
❤️❤️❤️
@asmitshukla4649
@asmitshukla4649 5 ай бұрын
Bhaiya bolna nahi chahiye...but last tak aate aate itna confuse kar diya aapne, ki kya batau😭😭😢😢😢😢
@NEF7354
@NEF7354 5 ай бұрын
it was a waste of 40 minutes and demotivating for me...........
@akashkaruturi5128
@akashkaruturi5128 5 ай бұрын
I think the flow was not correct, felt lost at many points. Completely confused by watching this video, couldn't able to finish it. I have been following you for such a long time and I really appreciate your efforts you put into every video, but you need to change some patterns. - Try including a dry run with live example. - Length is not a problem, but the way you explain makes people more clear about the approach and the concept. - You are trying to combine dry-run coding, part and everything at single place which makes more confusing. - It doesn't matter how many colours you use in an example with out live dry run with 1 or 2 examples which has edge cases. (In my opinion) - Some videos are really good with nice dry runs and all but in most of the videos that is the major missing part which drives people to other channels like Neetcode and Striver instead of our channel. - I hope you take this feedback in constructive manner and get back with improvements. Cheers :)
@abhiroopsingh9320
@abhiroopsingh9320 5 ай бұрын
kzbin.info/www/bejne/gISkp4eir7t2fclh-> This video has the best explanation along with complete dry run.
@TON-108
@TON-108 5 ай бұрын
I was waiting for this 😅
@ARYANMITTAL
@ARYANMITTAL 5 ай бұрын
Arey TON bro, after a long time, kha the? ❤
@TON-108
@TON-108 5 ай бұрын
@@ARYANMITTAL Just following you 🙂
@ARYANMITTAL
@ARYANMITTAL 5 ай бұрын
❤️❤️❤️🫂
@ankandebnath1056
@ankandebnath1056 5 ай бұрын
your are making it generic but the explanation style is not so clear
@vasudevans948
@vasudevans948 Ай бұрын
HORRIBLE PRESENTATION - better improve your presentation skill. I was trying to get to the meat of the matter... couldn't bear it....
@akhilkarumanchi458
@akhilkarumanchi458 5 ай бұрын
too messy explanation !!! :(
@kanikagyamlani
@kanikagyamlani 3 ай бұрын
kya bekar question hai
@akshatsingh6036
@akshatsingh6036 5 ай бұрын
i dont know but sometimes i feel your words are not clear and maybe if your english is not fluent then try to explain in hindi as your content visual quality is good but not the way you explain in english
@lavanya_m01
@lavanya_m01 5 ай бұрын
He is fluent enough to convey the content. If I could understand it, you should too! or maybe try improving your english interpreting skills of various accents.
@akshatsingh6036
@akshatsingh6036 5 ай бұрын
@@lavanya_m01 i get it i understand the words he is uttering but explaining clearly in english with the correct example is the key to educate people. It was just a feedback from my side that there are a lot of people who he can educate in hindi and still earn a heafty of views
@lavanya_m01
@lavanya_m01 5 ай бұрын
​@@akshatsingh6036I'm not fluent in Hindi 😂 so people like me wouldn't understand.. prolly he can start another Hindi channel and see if that blows up :)
@raunakkumar1150
@raunakkumar1150 5 ай бұрын
Try to speak slowly and pronounce clear words.
@ARYANMITTAL
@ARYANMITTAL 5 ай бұрын
Which portion was fast bro❤️❤️🫂
@riti6372
@riti6372 5 ай бұрын
Why don't you try to understand what he is saying? I had no problem with his pronounciation. When someone is putting efforts for benefit of others, don't try to criticize them or make them feel bad. Your words reflect your personality.
@raunakkumar1150
@raunakkumar1150 5 ай бұрын
​@@riti6372O dear you took me wrong, I appreciate his effort but he has to work on his negative points. I am not criticising him, i sail what I felt. Sorry bro(Ayan ) I had hurt you
@AYJ959
@AYJ959 5 ай бұрын
​@@riti6372 he is not criticising him, It will help him to grow more. (Read other comments too)
@roshanaswal7221
@roshanaswal7221 5 ай бұрын
It was bit confusing
@ARYANMITTAL
@ARYANMITTAL 5 ай бұрын
At what point bro?
@roshanaswal7221
@roshanaswal7221 5 ай бұрын
@@ARYANMITTAL i can't say exactly at what point but it was hard to follow, it will be much better if you keep it short, to the point in sequential manner
@ishikatailor
@ishikatailor 5 ай бұрын
Too confusing for me.I don't know about others. First you explaining here with char b, than suddenly c.Plz keep flow normal and stick to one example. 🥹👐🏻
@Codedaily-bw4ez
@Codedaily-bw4ez 5 ай бұрын
right
@ARYANMITTAL
@ARYANMITTAL 5 ай бұрын
Hi Ishika, really apologies if this was confusing, i was taking an example of b, but then while taking this example itself, realised this can be specific and result to all 0000s thus people might have a question of does it actually result in all 000s? But then we planned to take a more generic example which can cover all cases. Next time we’ll stick to one example, any other points which you thought was over whelming or confusing? Please do let us know, we’ll surely take care of it from next time !!
310. Minimum Height Trees | BFS | Topological Sort | Graphs
24:47
«Кім тапқыр?» бағдарламасы
00:16
Balapan TV
Рет қаралды 284 М.
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,2 МЛН
Terence Tao at IMO 2024: AI and Mathematics
57:24
AIMO Prize
Рет қаралды 506 М.
Dynamic Programming isn't too hard. You just don't know what it is.
22:31
DecodingIntuition
Рет қаралды 174 М.
The LeetCode Fallacy
6:08
NeetCode
Рет қаралды 539 М.
Why Isn't Functional Programming the Norm? - Richard Feldman
46:09
The BEST Way to Find a Random Point in a Circle | #SoME1 #3b1b
18:35
Number of Subarrays with xor K | Brute - Better - Optimal
24:55
take U forward
Рет қаралды 137 М.
Stop using std::vector wrong
23:14
The Cherno
Рет қаралды 107 М.