- Видео 55
- Просмотров 4 847
Amit Choraria
Добавлен 24 авг 2016
3321. Find X-Sum of All K-Long Subarrays II | Leetcode | Weekly Contest 419
3321. Find X-Sum of All K-Long Subarrays II - leetcode.com/problems/find-x-sum-of-all-k-long-subarrays-ii/description/
Solution: github.com/jainamit130/Leetcode/blob/main/3321-find-x-sum-of-all-k-long-subarrays-ii/3321-find-x-sum-of-all-k-long-subarrays-ii.cpp
Solution: github.com/jainamit130/Leetcode/blob/main/3321-find-x-sum-of-all-k-long-subarrays-ii/3321-find-x-sum-of-all-k-long-subarrays-ii.cpp
Просмотров: 43
Видео
3320. Count The Number of Winning Sequences | Leetcode | Weekly Contest 419
Просмотров 20День назад
3320. Count The Number of Winning Sequences - leetcode.com/problems/count-the-number-of-winning-sequences/description/ Solution: github.com/jainamit130/Leetcode/blob/main/3320-count-the-number-of-winning-sequences/3320-count-the-number-of-winning-sequences.cpp
Find XSum of All K-Long Subarrays I | K-th Largest Perfect Subtree Size in Binary Tree | Contest 419
Просмотров 51День назад
Problem 3318: leetcode.com/problems/find-x-sum-of-all-k-long-subarrays-i/ Solution 3318: github.com/jainamit130/Leetcode/blob/main/3318-find-x-sum-of-all-k-long-subarrays-i/3318-find-x-sum-of-all-k-long-subarrays-i.cpp Problem 3319: leetcode.com/problems/k-th-largest-perfect-subtree-size-in-binary-tree/description/ Solution 3319: github.com/jainamit130/Leetcode/blob/main/3319-k-th-largest-perfe...
Biweekly Contest | First 3 Problems- 3314, 3315 & 3316 | Leetcode
Просмотров 92День назад
Problem 3314: Construct the Minimum Bitwise Array I: leetcode.com/problems/construct-the-minimum-bitwise-array-i/description/ Solution 3314: github.com/jainamit130/Leetcode/blob/main/3280-convert-date-to-binary/3280-convert-date-to-binary.cpp Problem 3315: Construct the Minimum Bitwise Array II: leetcode.com/problems/construct-the-minimum-bitwise-array-i/description/ Solution 3315: github.com/j...
3312. Sorted GCD Pair Queries | Leetcode | Weekly Contest 418
Просмотров 10614 дней назад
3312. Count of Substrings Containing Every Vowel and K Consonants II - leetcode.com/problems/sorted-gcd-pair-queries/description/ Solution: github.com/jainamit130/Leetcode/blob/main/3312-sorted-gcd-pair-queries/3312-sorted-gcd-pair-queries.cpp
3306. Count of Substrings Containing Every Vowel and K Consonants II | Binary Search | Leetcode
Просмотров 6221 день назад
3306. Count of Substrings Containing Every Vowel and K Consonants II - leetcode.com/problems/count-of-substrings-containing-every-vowel-and-k-consonants-ii/ Solution: github.com/jainamit130/Leetcode/blob/main/3306-count-of-substrings-containing-every-vowel-and-k-consonants-ii/3306-count-of-substrings-containing-every-vowel-and-k-consonants-ii.cpp
Biweekly Contest 140 | 3300, 3301 & 3302 | First 3 Problems | Leetcode
Просмотров 9221 день назад
Problem 3300- Minimum Element After Replacement With Digit Sum: leetcode.com/problems/minimum-element-after-replacement-with-digit-sum/ Solution: github.com/jainamit130/Leetcode/blob/main/3300-minimum-element-after-replacement-with-digit-sum/3300-minimum-element-after-replacement-with-digit-sum.cpp Problem 3301- Maximize the Total Height of Unique Towers: leetcode.com/problems/maximize-the-tota...
Count Substrings That Can Be Rearranged to Contain a String I & II (2 Approaches)-Weekly Contest 416
Просмотров 107Месяц назад
Problem: leetcode.com/problems/count-substrings-that-can-be-rearranged-to-contain-a-string-i/description/ Solution: github.com/jainamit130/Leetcode/blob/main/3297-count-substrings-that-can-be-rearranged-to-contain-a-string-i/3297-count-substrings-that-can-be-rearranged-to-contain-a-string-i.cpp Problem: leetcode.com/problems/count-substrings-that-can-be-rearranged-to-contain-a-string-ii/descrip...
3295 & 3296- Minimum Number of Seconds to Make Mountain Height Zero (2 Approach)- Weekly Contest 416
Просмотров 105Месяц назад
Problem: leetcode.com/problems/report-spam-message/description/ Solution: github.com/jainamit130/Leetcode/blob/main/3295-report-spam-message/3295-report-spam-message.cpp Problem: leetcode.com/problems/minimum-number-of-seconds-to-make-mountain-height-zero/description/ Solution: github.com/jainamit130/Leetcode/blob/main/3296-minimum-number-of-seconds-to-make-mountain-height-zero/3296-minimum-num...
3288. Length of the Longest Increasing Path | Biweekly Contest 139 | Leetcode
Просмотров 121Месяц назад
Problem: leetcode.com/problems/length-of-the-longest-increasing-path/description/ Solution: github.com/jainamit130/Leetcode/blob/main/3288-length-of-the-longest-increasing-path/3288-length-of-the-longest-increasing-path.cpp
3287. Find the Maximum Sequence Value of Array | Biweekly Contest 139 | Leetcode
Просмотров 567Месяц назад
Problem: leetcode.com/problems/find-the-maximum-sequence-value-of-array/description/ Solution: github.com/jainamit130/Leetcode/blob/main/3287-find-the-maximum-sequence-value-of-array/3287-find-the-maximum-sequence-value-of-array.cpp
3283. Maximum Number of Moves to Kill All Pawns | Weekly Contest 414 | Leetcode
Просмотров 46Месяц назад
Problem 3283: leetcode.com/problems/maximum-number-of-moves-to-kill-all-pawns/ Solution 3283: github.com/jainamit130/Leetcode/blob/main/3283-maximum-number-of-moves-to-kill-all-pawns/3283-maximum-number-of-moves-to-kill-all-pawns.cpp
Weekly Contest 414 | First 3 Problems- 3280, 3281 & 3282 | Leetcode
Просмотров 77Месяц назад
The fourth problem begin lengthy is uploaded seperately. Problem 3280: leetcode.com/problems/convert-date-to-binary/description/ Solution 3280: github.com/jainamit130/Leetcode/blob/main/3280-convert-date-to-binary/3280-convert-date-to-binary.cpp Problem 3281: leetcode.com/problems/maximize-score-of-numbers-in-ranges/description/ Solution 3281: github.com/jainamit130/Leetcode/blob/main/3281-maxi...
3276. Select Cells in Grid With Maximum Score | Weekly Contest 413 | Leetcode
Просмотров 79Месяц назад
Problem Link: leetcode.com/problems/select-cells-in-grid-with-maximum-score/ Solution Link: github.com/jainamit130/Leetcode/blob/main/3276-select-cells-in-grid-with-maximum-score/3276-select-cells-in-grid-with-maximum-score.cpp
3272. Find the Count of Good Integers | Biweekly Contest 138 | Leetcode
Просмотров 395Месяц назад
Problem 3272: leetcode.com/problems/find-the-count-of-good-integers/description/ Solution 3272: github.com/jainamit130/Leetcode/blob/main/3272-find-the-count-of-good-integers/3272-find-the-count-of-good-integers.cpp
3273. Minimum Amount of Damage Dealt to Bob | Biweekly Contest 138 | Leetcode
Просмотров 92Месяц назад
3273. Minimum Amount of Damage Dealt to Bob | Biweekly Contest 138 | Leetcode
Biweekly Contest 138 | First 2 Problems | 3270 and 3271 | Leetcode
Просмотров 36Месяц назад
Biweekly Contest 138 | First 2 Problems | 3270 and 3271 | Leetcode
Final Array State After K Multiplication Operations I and II | Weekly Contest 412 | 3264 and 3266
Просмотров 962 месяца назад
Final Array State After K Multiplication Operations I and II | Weekly Contest 412 | 3264 and 3266
698. Partition to K Equal Sum Subsets | Leetcode
Просмотров 232 месяца назад
698. Partition to K Equal Sum Subsets | Leetcode
3257. Maximum Value Sum by Placing Three Rooks II | Leetcode | Biweekly Contest: 137
Просмотров 1512 месяца назад
3257. Maximum Value Sum by Placing Three Rooks II | Leetcode | Biweekly Contest: 137
3256. Maximum Value Sum by Placing Three Rooks I | Biweekly Contest 137 | Leetcode
Просмотров 4332 месяца назад
3256. Maximum Value Sum by Placing Three Rooks I | Biweekly Contest 137 | Leetcode
Find the Power of K-Size Subarrays I and II | Biweekly Contest 137 | 3254 and 3255 | Leetcode
Просмотров 442 месяца назад
Find the Power of K-Size Subarrays I and II | Biweekly Contest 137 | 3254 and 3255 | Leetcode
3251. Find the Count of Monotonic Pairs II | Weekly Contest 410 | Leetcode
Просмотров 1092 месяца назад
3251. Find the Count of Monotonic Pairs II | Weekly Contest 410 | Leetcode
Weekly Contest 410 | Leetcode | 3248, 3249 and 3250 | First 3 Problems
Просмотров 732 месяца назад
Weekly Contest 410 | Leetcode | 3248, 3249 and 3250 | First 3 Problems
42. Trapping Rain Water | LeetCode | Monotonic Stack
Просмотров 252 месяца назад
42. Trapping Rain Water | LeetCode | Monotonic Stack
687. Longest Univalue Path | Leetcode
Просмотров 172 месяца назад
687. Longest Univalue Path | Leetcode
558. Logical OR of Two Binary Grids Represented as Quad-Trees | Leetcode | Divide and Conquer
Просмотров 232 месяца назад
558. Logical OR of Two Binary Grids Represented as Quad-Trees | Leetcode | Divide and Conquer
968. Binary Tree Cameras | Leetcode | Modified knapsack Problem
Просмотров 162 месяца назад
968. Binary Tree Cameras | Leetcode | Modified knapsack Problem
thanks bhai
Thanks a lot sir... btw i am unable to solve DP ques how to improve it?
@@ITACH1688 I used to solve more recursive problems before i got to dp, then i started solving more dp using top down approaches and then made way towards bottom up approaches. There is no secret to it. Just keep practicing and you will get there.
@@amitchoraria5737 Thanks ❤️
keep posting bhaiya
Brilliant.
good efforts, although you have a good potential but try to be more clear while delivering as you seem to be confuse sometimes
@@shubhambhatt6913 Agreed and Noted. Thanks
bhut ache bhai
In this piece of code if(mp.find(0)!=mp.end() && mp[0]>0){ mp[0]--; ans-=permutations(mp,n-1); } You are subtracting zero count by 1 by fixing zero at start.But what if the number is 5005 and a possible arrangement is 0055.Here there are 2 leading zeroes.So how code will work?
Awesome point raised!! Here, Since we don’t want any "Permutation" starting with a 0. Hence, the code Permutations(mp,n-1); => (with one less count of 0 in map) Will give all the permutations starting with 0. So, in the example you mentioned it will give, 3 permutations that are 0505 0550 0055 The permutation 0055 will also be removed from the total permutations. Only 3 valid ones would remain that are: 5005 5050 5500 So, we are not just fixing zero at the start but we are finding all the permutations with the 0 as the start. Hope, this clears.
nice explanation man! i hope you will upload other more optimal solution for this ques
nice man!
simple and nice
nice
Bhaiya kisi ka samajh nhi aaya tha but aapka 3rd ques aa gya samajh thank You
Greta explantion bro.. also upload video for Maximum Value Sum by Placing Three Rooks II🎯🎯
Thanks….have uploaded the second part as well: ruclips.net/video/2O9qvoquPVQ/видео.htmlsi=qnxNzf11lGM4uLGo
bro, Great explanation ! each and every thing is crystal clear, Hoping you will continue this excellent work 💯
nice video
3rd one i am wondering how u think that logic great work bro
Please explain the algo in whiteboard with dry run
1080 not available why?
I like the shading and the output! Something you can use as an icon of a burger company! Missing burgers now. I’m supporting you ❤️