3116. Kth Smallest Amount With Single Denomination Combination | Weekly Leetcode 393

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

codingMohan

codingMohan

Күн бұрын

Пікірлер: 22
@sanjai_rs7
@sanjai_rs7 8 ай бұрын
31:30 can you share in which video have u explained that Bit masking concept.
@Dawodu_Johnson
@Dawodu_Johnson 9 ай бұрын
I have about 8 emails. You should recognise my name 😅...the one with the guitar. Just wanted to let u know I have subscribed with all of them
@codingmohan
@codingmohan 9 ай бұрын
Thank you! But you don't need to do this. My motive with this channel is just to make few people better at coding :)
@UnknownLearner-od3qn
@UnknownLearner-od3qn 9 ай бұрын
Great explanation!! Relating to existing Previous Problems is awesome❤❤❤
@vaibhavagarwal2421
@vaibhavagarwal2421 9 ай бұрын
figured out it involoved bitmasking and bs during contest, but had no clue about inclusion-exclusion part. Great video tho👍
@shivamjoshi4176
@shivamjoshi4176 9 ай бұрын
Got goosebumps after seeing value of k But he explained it so precisely
@vaibhavkumar8341
@vaibhavkumar8341 7 ай бұрын
What if answer given by binary search (say x) is not a valid amount? I think we also need to validate the x finally. If x can be formed by some coin then okay else find minimum valid amount >=x from all coins and take minimum among them. Please correct me if I'm wrong.
@universalcosmologist3675
@universalcosmologist3675 25 күн бұрын
yes correct
@aniny
@aniny 8 ай бұрын
Can anyone explain the cnt%2 part and why are we adding subtracting accordingly??
@codingmohan
@codingmohan 8 ай бұрын
It is because the expression containing odd number of sets are added in the union formula whereas the one with even number of sets are subtracted. For example - AUB = A + B - AnB. Notice A and B are positive (expression with just 1 set i.e. odd number of sets).
@HARSHMISHRA-lb5nr
@HARSHMISHRA-lb5nr 9 ай бұрын
Thanks for your playlists
@bhavanidattchalumuru
@bhavanidattchalumuru 9 ай бұрын
In approach 3, question is about finding the kth smallest or kth largest ? Because in a case where we have more than k elements on both side, if we check the first side and ignore the right side(which is where the kth largest element will be in case when the array is sorted increasing manner ) then it will be an issue.
@codingmohan
@codingmohan 9 ай бұрын
It's kth smallest and hence we need to check specifically for the left side.
@hritikanand9734
@hritikanand9734 9 ай бұрын
mind blowing 🤯🤯
@souravshaw8904
@souravshaw8904 9 ай бұрын
Great explanation 💯
@jiaxuwu2114
@jiaxuwu2114 9 ай бұрын
Thank you sir. But I want ask a question (maybe stupid). Why can we sure that the return value l is in the given arrays.
@raghavendrac4710
@raghavendrac4710 9 ай бұрын
Thank you sir!
@mayankjohari1951
@mayankjohari1951 9 ай бұрын
Nice explanation
@jawadkaiyal5008
@jawadkaiyal5008 7 ай бұрын
i would be very thankful if you write the solution code in python
@executioner769
@executioner769 9 ай бұрын
Waiting for your Video
@JIGARSINGTHAKOR-yy6qp
@JIGARSINGTHAKOR-yy6qp 9 ай бұрын
Difficult 😢
@iWontFakeIt
@iWontFakeIt 9 ай бұрын
classic inclusion exclusion principle to be followed!
3276. Select Cells in Grid With Maximum Score | Weekly Leetcode 413
36:39
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
One second to compute the largest Fibonacci number I can
25:55
Sheafification of G
Рет қаралды 449 М.
I reimplemented REACT SERVER COMPONENTS in ASSEMBLY
20:35
Neo Goose
Рет қаралды 6 М.
How I Mastered Data Structures and Algorithms in 8 Weeks
15:46
Aman Manazir
Рет қаралды 154 М.
Google Gemini Tried Chess. HUGE Mistake.
20:44
GothamChess
Рет қаралды 296 М.
How to STUDY so FAST it feels like CHEATING
8:03
The Angry Explainer
Рет қаралды 2,5 МЛН
I made maps that show time instead of space
10:44
Václav Volhejn
Рет қаралды 1 МЛН
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 193 М.
I Solved 100 LeetCode Problems
13:11
Green Code
Рет қаралды 301 М.
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН