Skip to content
Avio Lines
D20

Greedy

76 stations · 37h

Exchange 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 →
problems by zone (pattern)
  • Intervals & Activity Selection2
  • Sorting-based Greedy25
  • Exchange Argument & Ordering20
  • Jump Game & Reachability2
  • Greedy with Heap5
  • Greedy on Strings & Counting27
  1. Intervals & Activity Selection

    0 of 2 passed
  2. MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  3. Sorting-based Greedy

    0 of 25 passed
  4. Bag of TokensLC 948 · 18:28
    MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  5. Boats to Save PeopleLC 881 · 13:59
    MediumGoogle · Amazon · +10 more companiesLeetCode ↗ (opens in a new tab)
  6. Maximum Ice Cream BarsLC 1833 · 4:08
    MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
  7. HardGoogle · Salesforce · +4 more companiesLeetCode ↗ (opens in a new tab)
  8. MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  9. MediumGoogle · Meta · +1 more companiesLeetCode ↗ (opens in a new tab)
  10. MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  11. MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  12. HardGoogle · Meta · +2 more companiesLeetCode ↗ (opens in a new tab)
  13. MediumGoogle · Amazon · +5 more companiesLeetCode ↗ (opens in a new tab)
  14. MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  15. HardGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
  16. MediumGoogle · Amazon · +5 more companiesLeetCode ↗ (opens in a new tab)
  17. Destroying AsteroidsLC 2126 · 11:50
    MediumGoogle · MicrosoftLeetCode ↗ (opens in a new tab)
  18. Maximum Building HeightLC 1840 · 1:01:53
    HardGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  19. MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
  20. MediumAmazon · Microsoft · +1 more companiesLeetCode ↗ (opens in a new tab)
  21. Exchange Argument & Ordering

    0 of 20 passed
  22. Broken CalculatorLC 991 · 16:24
    MediumGoogle · Microsoft · +3 more companiesLeetCode ↗ (opens in a new tab)
  23. HardGoogle · Amazon · +11 more companiesLeetCode ↗ (opens in a new tab)
  24. CANDYLC 135 · 39:33
    HardGoogle · Amazon · +20 more companiesLeetCode ↗ (opens in a new tab)
  25. Patching ArrayLC 330 · 32:03
    HardGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  26. MediumGoogle · Bloomberg · +1 more companiesLeetCode ↗ (opens in a new tab)
  27. MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  28. MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
  29. MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  30. Rearranging FruitsLC 2561 · 41:10
    HardGoogle · Amazon · +6 more companiesLeetCode ↗ (opens in a new tab)
  31. MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  32. MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  33. Cinema Seat AllocationLC 1386 · 40:32
    MediumMicrosoft · Bloomberg · +3 more companiesLeetCode ↗ (opens in a new tab)
  34. EasyGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
  35. EasyGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
  36. Jump Game & Reachability

    0 of 2 passed
  37. Gas StationLC 134 · 46:30
    MediumGoogle · Amazon · +25 more companiesLeetCode ↗ (opens in a new tab)
  38. MediumGoogle · Amazon · +10 more companiesLeetCode ↗ (opens in a new tab)
  39. Greedy with Heap

    0 of 5 passed
  40. MediumGoogle · Amazon · +10 more companiesLeetCode ↗ (opens in a new tab)
  41. Task SchedulerLC 621 · 27:20
    MediumGoogle · Amazon · +21 more companiesLeetCode ↗ (opens in a new tab)
  42. MediumGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
  43. MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
  44. MediumAmazon · Microsoft · +1 more companiesLeetCode ↗ (opens in a new tab)
  45. Greedy on Strings & Counting

    0 of 27 passed
  46. Break a PalindromeLC 1328 · 15:06
    MediumNvidia · Expedia · +3 more companiesLeetCode ↗ (opens in a new tab)
  47. MediumAmazon · Microsoft · +1 more companiesLeetCode ↗ (opens in a new tab)
  48. Maximum 69 NumberLC 1323 · 14:44
    EasyGoogle · Amazon · +5 more companiesLeetCode ↗ (opens in a new tab)
  49. MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  50. Dota2 SenateLC 649 · 25:52
    MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
  51. MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  52. MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  53. MediumGoogle · Bloomberg · +1 more companiesLeetCode ↗ (opens in a new tab)
  54. MediumMeta · Microsoft · +2 more companiesLeetCode ↗ (opens in a new tab)
  55. MediumMeta · Microsoft · +2 more companiesLeetCode ↗ (opens in a new tab)
  56. MediumGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
  57. MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  58. HardGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
  59. MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
  60. HardGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
  61. MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  62. Sum GameLC 1927 · 36:13
    MediumDE ShawLeetCode ↗ (opens in a new tab)
  63. MediumGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)

All 76 stations in order

  1. 1.Bag of Tokens (LeetCode 948)
  2. 2.Boats to Save People (LeetCode 881)
  3. 3.Break a Palindrome (LeetCode 1328)
  4. 4.Broken Calculator (LeetCode 991)
  5. 5.Minimum Time to Make Rope Colorful (LeetCode 1578)
  6. 6.Earliest Possible Day of Full Bloom(Google, Amazon, Microsoft, Adobe):Explanation ➕ Live Coding (LeetCode 2136)
  7. 7.Longest Palindrome by Concatenating Two Letter Words: Greedy Explanation ➕ Live Coding 🧑🏻‍💻 (LeetCode 2131)
  8. 8.Maximum 69 Number (LeetCode 1323)
  9. 9.Maximum Bags With Full Capacity of Rocks (LeetCode 2279)
  10. 10.Minimum Rounds to Complete All Tasks : Explanation ➕ Live Coding 🧑🏻‍💻👩🏻‍💻 (LeetCode 2244)
  11. 11.Maximum Ice Cream Bars (LeetCode 1833)
  12. 12.Gas Station (LeetCode 134)
  13. 13.Optimal Partition of String - (AMAZON) (LeetCode 2405)
  14. 14.Dota2 Senate (LeetCode 649)
  15. 15.Minimum Replacements to Sort the Array (LeetCode 2366)
  16. 16.Minimum Number of Taps to Open to Water a Garden (LeetCode 1326)
  17. 17.Minimum Deletions to Make Character Frequencies Unique (LeetCode 1647)
  18. 18.CANDY (LeetCode 135)
  19. 19.Remove Colored Pieces if Both Neighbors are the Same Color (LeetCode 2038)
  20. 20.Maximum Score of a Good Subarray (LeetCode 1793)
  21. 21.Eliminate Maximum Number of Monsters (LeetCode 1921)
  22. 22.Maximum Element After Decreasing and Rearranging (LeetCode 1846)
  23. 23.Maximum Number of Coins You Can Get (LeetCode 1561)
  24. 24.Minimum Number of Operations to Make Array Empty (LeetCode 2870)
  25. 25.Water the plants
  26. 26.Find Polygon With the Largest Perimeter (LeetCode 2971)
  27. 27.Least Number of Unique Integers after K Removals (LeetCode 1481)
  28. 28.Furthest Building You Can Reach (LeetCode 1642)
  29. 29.Earliest Second to Mark Indices I (LeetCode 3048)
  30. 30.Minimum Deletions to Make String K-Special (LeetCode 3085)
  31. 31.Task Scheduler (LeetCode 621)
  32. 32.Maximize Happiness of Selected Children (LeetCode 3075)
  33. 33.Find the Maximum Sum of Node Values (LeetCode 3068)
  34. 34.Minimum Increment to Make Array Unique (LeetCode 945)
  35. 35.Patching Array (LeetCode 330)
  36. 36.Minimum Cost for Cutting Cake I & II (LeetCode 3218)
  37. 37.Maximum Distance in Arrays (LeetCode 624)
  38. 38.Maximum Number of Integers to Choose From a Range I (LeetCode 2554)
  39. 39.Maximum Average Pass Ratio (LeetCode 1792)
  40. 40.Minimum Domino Rotations For Equal Row (LeetCode 1007)
  41. 41.Minimum Equal Sum of Two Arrays After Replacing Zeros (LeetCode 2918)
  42. 42.Max Difference You Can Get From Changing an Integer (LeetCode 1432)
  43. 43.Maximum Manhattan Distance After K Changes (LeetCode 3443)
  44. 44.Longest Binary Subsequence Less Than or Equal to K (LeetCode 2311)
  45. 45.Reschedule Meetings for Maximum Free Time II (LeetCode 3440)
  46. 46.Maximize Subarrays After Removing One Conflicting Pair (LeetCode 3480)
  47. 47.Rearranging Fruits (LeetCode 2561)
  48. 48.Minimum Number of People to Teach (LeetCode 1733)
  49. 49.Maximum Number of Distinct Elements After Operations (LeetCode 3397)
  50. 50.Minimum Number of Operations to Make All Array Elements Equal to 1 (LeetCode 2654)
  51. 51.Maximum Number of Operations to Move Ones to the End (LeetCode 3228)
  52. 52.Set Intersection Size At Least Two (LeetCode 757)
  53. 53.Greatest Sum Divisible by Three (LeetCode 1262)
  54. 54.Minimum Moves to Balance Circular Array (LeetCode 3776)
  55. 55.Partitioning Into Minimum Number Of Deci-Binary Numbers (LeetCode 1689)
  56. 56.Lexicographically Smallest Generated String (LeetCode 3474)
  57. 57.Destroying Asteroids (LeetCode 2126)
  58. 58.Maximum Total Subarray Value I (LeetCode 3689)
  59. 59.Maximum Building Height (LeetCode 1840)
  60. 60.Smallest Palindromic Rearrangement I (LeetCode 3517)
  61. 61.Smallest Divisible Digit Product I & II (LeetCode 3348)
  62. 62.Find the Lexicographically Smallest Valid Sequence (LeetCode 3302)
  63. 63.Stone Game IX (LeetCode 2029)
  64. 64.Cinema Seat Allocation (LeetCode 1386)
  65. 65.Sum Game (LeetCode 1927)
  66. 66.Lexicographically Smallest Permutation Greater Than Target (LeetCode 3720)
  67. 67.Lexicographically Smallest Palindromic Permutation Greater Than Target (LeetCode 3734)
  68. 68.Maximum Number of Non-Overlapping Substrings (LeetCode 1520)
  69. 69.Maximum Nesting Depth of Two Valid Parentheses Strings (LeetCode 1111)
  70. 70.Minimum Insertions to Balance a Parentheses String (LeetCode 1541)
  71. 71.Minimum Sum of Squared Difference (LeetCode 2333)
  72. 72.Maximize Sum of Squares of Digits (LeetCode 3723)
  73. 73.Maximum Odd Binary Number (LeetCode 2864)
  74. 74.Maximum Value of an Ordered Triplet I (LeetCode 2873)
  75. 75.Maximum Difference by Remapping a Digit (LeetCode 2566)
  76. 76.Maximum Alternating Sum of Squares (LeetCode 3727)