D20
Greedy
76 stations · 37hExchange arguments, intervals and greedy choice. 76 interview problems explained by codestorywithMIK (37h of video), grouped into 6 patterns such as Intervals & Activity Selection, Sorting-based Greedy, Exchange Argument & Ordering.
Start this line →- Intervals & Activity Selection2
- Sorting-based Greedy25
- Exchange Argument & Ordering20
- Jump Game & Reachability2
- Greedy with Heap5
- Greedy on Strings & Counting27
Intervals & Activity Selection
0 of 2 passed- Reschedule Meetings for Maximum Free Time IILC 3440 · 43:57MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Number of Non-Overlapping SubstringsLC 1520 · 43:36HardAmazonLeetCode ↗ (opens in a new tab)
Sorting-based Greedy
0 of 25 passed- Boats to Save PeopleLC 881 · 13:59MediumGoogle · Amazon · +10 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Bags With Full Capacity of RocksLC 2279 · 14:26MediumAmazon · InfosysLeetCode ↗ (opens in a new tab)
- Maximum Ice Cream BarsLC 1833 · 4:08MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Replacements to Sort the ArrayLC 2366 · 30:57HardGoogle · Salesforce · +4 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Deletions to Make Character Frequencies UniqueLC 1647 · 25:15MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Eliminate Maximum Number of MonstersLC 1921 · 20:56MediumGoogle · Meta · +1 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Element After Decreasing and RearrangingLC 1846 · 15:50MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Number of Coins You Can GetLC 1561 · 22:18MediumAmazon · MicrosoftLeetCode ↗ (opens in a new tab)
- Least Number of Unique Integers after K RemovalsLC 1481 · 43:42MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Find the Maximum Sum of Node ValuesLC 3068 · 45:48HardGoogle · Meta · +2 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Increment to Make Array UniqueLC 945 · 29:01MediumGoogle · Amazon · +5 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Number of Integers to Choose From a Range ILC 2554 · 11:46MediumBloomberg · PayPalLeetCode ↗ (opens in a new tab)
- Maximum Number of Distinct Elements After OperationsLC 3397 · 33:57MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Set Intersection Size At Least TwoLC 757 · 42:41HardGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Greatest Sum Divisible by ThreeLC 1262 · 53:15MediumGoogle · Amazon · +5 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Moves to Balance Circular ArrayLC 3776 · 33:01MediumBloombergLeetCode ↗ (opens in a new tab)
- Maximum Building HeightLC 1840 · 1:01:53HardGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Smallest Palindromic Rearrangement ILC 3517 · 10:38MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Sum of Squared DifferenceLC 2333 · 34:51MediumAmazon · Microsoft · +1 more companiesLeetCode ↗ (opens in a new tab)
Exchange Argument & Ordering
0 of 20 passed- Broken CalculatorLC 991 · 16:24MediumGoogle · Microsoft · +3 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Number of Taps to Open to Water a GardenLC 1326 · 24:34HardGoogle · Amazon · +11 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Score of a Good SubarrayLC 1793 · 25:25HardGoogle · BloombergLeetCode ↗ (opens in a new tab)
- Maximum Distance in ArraysLC 624 · 12:16MediumGoogle · Bloomberg · +1 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Domino Rotations For Equal RowLC 1007 · 25:07MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Equal Sum of Two Arrays After Replacing ZerosLC 2918 · 19:32MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Max Difference You Can Get From Changing an IntegerLC 1432 · 20:13MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Maximize Subarrays After Removing One Conflicting PairLC 3480 · 55:07HardGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Rearranging FruitsLC 2561 · 41:10HardGoogle · Amazon · +6 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Number of People to TeachLC 1733 · 27:27MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Total Subarray Value ILC 3689 · 9:17MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Cinema Seat AllocationLC 1386 · 40:32MediumMicrosoft · Bloomberg · +3 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Value of an Ordered Triplet ILC 2873 · 19:19EasyGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Difference by Remapping a DigitLC 2566 · 26:45EasyGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
Jump Game & Reachability
0 of 2 passed- Furthest Building You Can ReachLC 1642 · 51:23MediumGoogle · Amazon · +10 more companiesLeetCode ↗ (opens in a new tab)
Greedy with Heap
0 of 5 passed- Furthest Building You Can ReachLC 1642 · 51:23MediumGoogle · Amazon · +10 more companiesLeetCode ↗ (opens in a new tab)
- Task SchedulerLC 621 · 27:20MediumGoogle · Amazon · +21 more companiesLeetCode ↗ (opens in a new tab)
- Maximize Happiness of Selected ChildrenLC 3075 · 15:08MediumGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Average Pass RatioLC 1792 · 43:04MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Sum of Squared DifferenceLC 2333 · 34:51MediumAmazon · Microsoft · +1 more companiesLeetCode ↗ (opens in a new tab)
Greedy on Strings & Counting
0 of 27 passed- Break a PalindromeLC 1328 · 15:06MediumNvidia · Expedia · +3 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Time to Make Rope ColorfulLC 1578 · 23:41MediumAmazon · Microsoft · +1 more companiesLeetCode ↗ (opens in a new tab)
- Longest Palindrome by Concatenating Two Letter Words: Greedy Explanation ➕ Live Coding 🧑🏻💻LC 2131 · 27:38MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Maximum 69 NumberLC 1323 · 14:44EasyGoogle · Amazon · +5 more companiesLeetCode ↗ (opens in a new tab)
- Optimal Partition of String - (AMAZON)LC 2405 · 15:55MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Deletions to Make Character Frequencies UniqueLC 1647 · 25:15MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Remove Colored Pieces if Both Neighbors are the Same ColorLC 2038 · 16:26MediumYelp · MathWorks · +1 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Number of Operations to Make Array EmptyLC 2870 · 20:21MediumAmazon · MetaLeetCode ↗ (opens in a new tab)
- Least Number of Unique Integers after K RemovalsLC 1481 · 43:42MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Deletions to Make String K-SpecialLC 3085 · 37:11MediumGoogle · Bloomberg · +1 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Manhattan Distance After K ChangesLC 3443 · 38:28MediumMeta · Microsoft · +2 more companiesLeetCode ↗ (opens in a new tab)
- Longest Binary Subsequence Less Than or Equal to KLC 2311 · 22:54MediumMeta · Microsoft · +2 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Number of Operations to Move Ones to the EndLC 3228 · 17:42MediumGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
- Partitioning Into Minimum Number Of Deci-Binary NumbersLC 1689 · 15:08MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Lexicographically Smallest Generated StringLC 3474 · 31:17HardGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Smallest Palindromic Rearrangement ILC 3517 · 10:38MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Smallest Divisible Digit Product I & IILC 3348 · 1:37:30HardGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Find the Lexicographically Smallest Valid SequenceLC 3302 · 37:33MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Lexicographically Smallest Permutation Greater Than TargetLC 3720 · 41:13MediumGoogle · AmazonLeetCode ↗ (opens in a new tab)
- Maximum Nesting Depth of Two Valid Parentheses StringsLC 1111 · 23:27MediumGoogle · MicrosoftLeetCode ↗ (opens in a new tab)
- Minimum Insertions to Balance a Parentheses StringLC 1541 · 16:09MediumGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
All 76 stations in order
- 1.Bag of Tokens (LeetCode 948)
- 2.Boats to Save People (LeetCode 881)
- 3.Break a Palindrome (LeetCode 1328)
- 4.Broken Calculator (LeetCode 991)
- 5.Minimum Time to Make Rope Colorful (LeetCode 1578)
- 6.Earliest Possible Day of Full Bloom(Google, Amazon, Microsoft, Adobe):Explanation ➕ Live Coding (LeetCode 2136)
- 7.Longest Palindrome by Concatenating Two Letter Words: Greedy Explanation ➕ Live Coding 🧑🏻💻 (LeetCode 2131)
- 8.Maximum 69 Number (LeetCode 1323)
- 9.Maximum Bags With Full Capacity of Rocks (LeetCode 2279)
- 10.Minimum Rounds to Complete All Tasks : Explanation ➕ Live Coding 🧑🏻💻👩🏻💻 (LeetCode 2244)
- 11.Maximum Ice Cream Bars (LeetCode 1833)
- 12.Gas Station (LeetCode 134)
- 13.Optimal Partition of String - (AMAZON) (LeetCode 2405)
- 14.Dota2 Senate (LeetCode 649)
- 15.Minimum Replacements to Sort the Array (LeetCode 2366)
- 16.Minimum Number of Taps to Open to Water a Garden (LeetCode 1326)
- 17.Minimum Deletions to Make Character Frequencies Unique (LeetCode 1647)
- 18.CANDY (LeetCode 135)
- 19.Remove Colored Pieces if Both Neighbors are the Same Color (LeetCode 2038)
- 20.Maximum Score of a Good Subarray (LeetCode 1793)
- 21.Eliminate Maximum Number of Monsters (LeetCode 1921)
- 22.Maximum Element After Decreasing and Rearranging (LeetCode 1846)
- 23.Maximum Number of Coins You Can Get (LeetCode 1561)
- 24.Minimum Number of Operations to Make Array Empty (LeetCode 2870)
- 25.Water the plants
- 26.Find Polygon With the Largest Perimeter (LeetCode 2971)
- 27.Least Number of Unique Integers after K Removals (LeetCode 1481)
- 28.Furthest Building You Can Reach (LeetCode 1642)
- 29.Earliest Second to Mark Indices I (LeetCode 3048)
- 30.Minimum Deletions to Make String K-Special (LeetCode 3085)
- 31.Task Scheduler (LeetCode 621)
- 32.Maximize Happiness of Selected Children (LeetCode 3075)
- 33.Find the Maximum Sum of Node Values (LeetCode 3068)
- 34.Minimum Increment to Make Array Unique (LeetCode 945)
- 35.Patching Array (LeetCode 330)
- 36.Minimum Cost for Cutting Cake I & II (LeetCode 3218)
- 37.Maximum Distance in Arrays (LeetCode 624)
- 38.Maximum Number of Integers to Choose From a Range I (LeetCode 2554)
- 39.Maximum Average Pass Ratio (LeetCode 1792)
- 40.Minimum Domino Rotations For Equal Row (LeetCode 1007)
- 41.Minimum Equal Sum of Two Arrays After Replacing Zeros (LeetCode 2918)
- 42.Max Difference You Can Get From Changing an Integer (LeetCode 1432)
- 43.Maximum Manhattan Distance After K Changes (LeetCode 3443)
- 44.Longest Binary Subsequence Less Than or Equal to K (LeetCode 2311)
- 45.Reschedule Meetings for Maximum Free Time II (LeetCode 3440)
- 46.Maximize Subarrays After Removing One Conflicting Pair (LeetCode 3480)
- 47.Rearranging Fruits (LeetCode 2561)
- 48.Minimum Number of People to Teach (LeetCode 1733)
- 49.Maximum Number of Distinct Elements After Operations (LeetCode 3397)
- 50.Minimum Number of Operations to Make All Array Elements Equal to 1 (LeetCode 2654)
- 51.Maximum Number of Operations to Move Ones to the End (LeetCode 3228)
- 52.Set Intersection Size At Least Two (LeetCode 757)
- 53.Greatest Sum Divisible by Three (LeetCode 1262)
- 54.Minimum Moves to Balance Circular Array (LeetCode 3776)
- 55.Partitioning Into Minimum Number Of Deci-Binary Numbers (LeetCode 1689)
- 56.Lexicographically Smallest Generated String (LeetCode 3474)
- 57.Destroying Asteroids (LeetCode 2126)
- 58.Maximum Total Subarray Value I (LeetCode 3689)
- 59.Maximum Building Height (LeetCode 1840)
- 60.Smallest Palindromic Rearrangement I (LeetCode 3517)
- 61.Smallest Divisible Digit Product I & II (LeetCode 3348)
- 62.Find the Lexicographically Smallest Valid Sequence (LeetCode 3302)
- 63.Stone Game IX (LeetCode 2029)
- 64.Cinema Seat Allocation (LeetCode 1386)
- 65.Sum Game (LeetCode 1927)
- 66.Lexicographically Smallest Permutation Greater Than Target (LeetCode 3720)
- 67.Lexicographically Smallest Palindromic Permutation Greater Than Target (LeetCode 3734)
- 68.Maximum Number of Non-Overlapping Substrings (LeetCode 1520)
- 69.Maximum Nesting Depth of Two Valid Parentheses Strings (LeetCode 1111)
- 70.Minimum Insertions to Balance a Parentheses String (LeetCode 1541)
- 71.Minimum Sum of Squared Difference (LeetCode 2333)
- 72.Maximize Sum of Squares of Digits (LeetCode 3723)
- 73.Maximum Odd Binary Number (LeetCode 2864)
- 74.Maximum Value of an Ordered Triplet I (LeetCode 2873)
- 75.Maximum Difference by Remapping a Digit (LeetCode 2566)
- 76.Maximum Alternating Sum of Squares (LeetCode 3727)