Count the Number of Square-Free Subsets | Weekly Contest 333 | Leetcode

  Рет қаралды 2,334

codingMohan

codingMohan

Күн бұрын

Пікірлер: 28
@TrueSolutionsOfficial
@TrueSolutionsOfficial Жыл бұрын
very good bro again , subscribed today
@rishabprasad5593
@rishabprasad5593 Жыл бұрын
Good job! Very lucid explanation with underlying basics needed. 👍
@bhargav1811
@bhargav1811 Жыл бұрын
14:21 isn't 5 also square free number? 11:39 wouldn't be time complexity be 2^n because for every index of array we are checking whether to include or not to achieve the given sum !! why just N *10?? 13:08 how had we reduced the 2^n into order N means? the overall complexity would be equal to O(O(N* 10 ) *10 ) which can be like approx O(N^3) ? correct me if i am wrong?
@tarunpatel8168
@tarunpatel8168 Жыл бұрын
Thanks bhai for great intuition building
@kapilchoudhary2922
@kapilchoudhary2922 Жыл бұрын
Brilliant explanation!!
@samagrapathak3854
@samagrapathak3854 Жыл бұрын
great solution
@amankrsingh
@amankrsingh Жыл бұрын
Please upload 2nd one also using recursive approach
@codingmohan
@codingmohan Жыл бұрын
I solved 2nd using Dijkstra (seems like overkill) but I'm still not able to understand the "complete" proof of the recursive approach. Let me know if you would like to know about the Dijkstra approach.
@amankrsingh
@amankrsingh Жыл бұрын
@@codingmohan yes please upload 2nd one And if it seems to be very tough then please increase the video length so that we can easily understand the concepts
@codingmohan
@codingmohan Жыл бұрын
Here you go - kzbin.info/www/bejne/ZpmnZZ-Im7BghbM
@shivanshsingh176
@shivanshsingh176 Жыл бұрын
Thank u so much
@doingit621
@doingit621 Жыл бұрын
plz post the dijkstra solution of 2nd question.
@codingmohan
@codingmohan Жыл бұрын
Here you go - kzbin.info/www/bejne/ZpmnZZ-Im7BghbM
@doingit621
@doingit621 Жыл бұрын
@@codingmohan sir can u plz share ur linked in
@doingit621
@doingit621 Жыл бұрын
@@codingmohan ur explanations are top notch
@doingit621
@doingit621 Жыл бұрын
can you plz explain 2nd question using the recursion/dp approach. Why do we always to to the nearst power of 2??
@dawodujohnson
@dawodujohnson Жыл бұрын
Very nice. Any tip on how to think this way during contest ? where do you practice ?
@codingmohan
@codingmohan Жыл бұрын
This may help - kzbin.infoUgkxQl3X9x7nzPsycq35BZE5dpxvrrC4ovvH
@souravshaw8904
@souravshaw8904 Жыл бұрын
Nice explanation 💯
@krishankant3720
@krishankant3720 Жыл бұрын
Thank u sir 4 uploading video
@nideeshn6293
@nideeshn6293 Жыл бұрын
Can you make a video for 2nd question as well
@codingmohan
@codingmohan Жыл бұрын
I solved 2nd using Dijkstra (seems like overkill) but I'm still not able to understand the "complete" proof of the recursive approach. Let me know if you would like to know about the Dijkstra approach.
@AakashKumar-vf3dh
@AakashKumar-vf3dh Жыл бұрын
I didn't understand why this wouldn't give TLE as the TC is 1e9. Can you explain why this would pass?
@codingmohan
@codingmohan Жыл бұрын
TC is not 1e9. It's 1e6. We are calling recursion everytime in the loop "but" we already considered the complexity of "all" possible recursion calls with 1e6 states. Think of it like this - call recursion for every single state "before" the loop and then you'll have everything in your "dp" populated. Now when you call it inside a loop, everything you'll get from the dp array itself i.e. O(1).
@pwnweb5734
@pwnweb5734 Жыл бұрын
how do i reward .. there is no option to pay in this video. would love to reward what i can for the good work
@codingmohan
@codingmohan Жыл бұрын
Thank you for your kind words. Glad you find it helpful :)
@iWontFakeIt
@iWontFakeIt Жыл бұрын
🔥
Find the String with LCP | Weekly Contest 333 | Leetcode
18:18
Minimum sum | GeeksForGeeks | Problem of the Day
9:45
Mathematics
Рет қаралды 51
Ice Cream or Surprise Trip Around the World?
00:31
Hungry FAM
Рет қаралды 13 МЛН
Trapped by the Machine, Saved by Kind Strangers! #shorts
00:21
Fabiosa Best Lifehacks
Рет қаралды 38 МЛН
The Quest To Make Unbreakable Glass
22:23
Veritasium
Рет қаралды 2,2 МЛН
3251. Find the Count of Monotonic Pairs II | Weekly Leetcode 410
33:04
3234  Count the Number of Substrings With Dominant Ones
17:20
CodeCracker
Рет қаралды 1,3 М.
3267. Count Almost Equal Pairs II | Weekly Leetcode 412
24:19
3276. Select Cells in Grid With Maximum Score | Weekly Leetcode 413
36:39