Can you please please make a video f question number of 1994 the number of good subsets , I am not getting the overall concept and nobody solves such tough questions on youtube except you! It would be of great help to all of us!!! Thanks!
Look. You have two options: take or not take an element. If you not take you just go further -> func(idx + 1); else take you should make a check if such element in defaultdict (dict) or not . If not you place the element in defaultdict and go further. But when you return you should remove from dict. Set in initial state .
"irritating" is a strong word. If you say "It would be less distracting if you reduce the hand movement", that might deliver what you wanted to say without hurting his feelings.
Code & Notes: leetcode.com/problems/the-number-of-beautiful-subsets/solutions/3316187/image-explanation-both-o-nlogn-o-2-n-approaches-best-explanation-on-leetcode/
keep up the good work
Wonderful explanation , keep up the good work !
cool dude..really a good explanation for a beginner like me..thnx
Oooooo Required a lot of patience , Nice one......!!!
nit: you do not need to sort vector v before you push items into the map mp2 (map is sorted anyway and this is why the code works)
Striver 2.0
I don't know why by map.find() wasn't working at all for me, whether I used set or map.
watched 2 times but i dont know what u did in the dp approach
why not use set in backtracking approach as we just care if nums[i]-k /nums[i]+k exists or not?
Can you please please make a video f question number of 1994 the number of good subsets , I am not getting the overall concept and nobody solves such tough questions on youtube except you!
It would be of great help to all of us!!!
Thanks!
I was not able to implement backtracking proble what to do bhaiya
Have you watched backtracking crash course bro?? 🫂
Look. You have two options: take or not take an element. If you not take you just go further -> func(idx + 1); else take you should make a check if such element in defaultdict (dict) or not . If not you place the element in defaultdict and go further. But when you return you should remove from dict. Set in initial state .
bro 1 and 4 itself can;t be taken bcoz 4-1=3 at 7:30
Yaa yaa yaa, true true bro
Can you explain why prevNotTaken is inititalized with 1 and prevTaken with 0
As initially we have empty subset
your vives match with striver
man this is a very bad explanation.
Is it necessary to move your hands ?? It's really irritating
"irritating" is a strong word. If you say "It would be less distracting if you reduce the hand movement", that might deliver what you wanted to say without hurting his feelings.
way of teaching is good, but that extra effort we require to keep attention on English, that's really irritating
worst explanation ever.