> ## Documentation Index
> Fetch the complete documentation index at: https://leetcode-py.wisl.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> leetcode-py is a Python LeetCode practice environment generator with one CLI: lcpy. It is not a service or platform.
> Each problem is a directory under leetcode/ with README.md, solution.py, test_solution.py, helpers.py, and playground.ipynb. lcpy gen creates them from JSON templates bundled with the package.
> Examples are backed by tests; copy them verbatim.

# Greedy in Python with Tests

> All 138 Greedy LeetCode problems with tested Python solutions.

Greedy holds 138 problems (15 Easy, 96 Medium, 27 Hard).
Generate any of them into the current directory with `lcpy gen -n <number>`.

<div className="sd-catalog-table">
  | # | Problem | Difficulty | Solution |
  | - | - | - | - |
  | 11 | [Container With Most Water](/problems/container-with-most-water) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/container_with_most_water/solution.py) |
  | 44 | [Wildcard Matching](/problems/wildcard-matching) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/wildcard_matching/solution.py) |
  | 45 | [Jump Game II](/problems/jump-game-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/jump_game_ii/solution.py) |
  | 55 | [Jump Game](/problems/jump-game) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/jump_game/solution.py) |
  | 122 | [Best Time to Buy and Sell Stock II](/problems/best-time-to-buy-and-sell-stock-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/best_time_to_buy_and_sell_stock_ii/solution.py) |
  | 134 | [Gas Station](/problems/gas-station) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/gas_station/solution.py) |
  | 135 | [Candy](/problems/candy) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/candy/solution.py) |
  | 179 | [Largest Number](/problems/largest-number) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_number/solution.py) |
  | 253 | [Meeting Rooms II](/problems/meeting-rooms-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/meeting_rooms_ii/solution.py) |
  | 280 | [Wiggle Sort](/problems/wiggle-sort) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/wiggle_sort/solution.py) |
  | 316 | [Remove Duplicate Letters](/problems/remove-duplicate-letters) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/remove_duplicate_letters/solution.py) |
  | 321 | [Create Maximum Number](/problems/create-maximum-number) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/create_maximum_number/solution.py) |
  | 324 | [Wiggle Sort II](/problems/wiggle-sort-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/wiggle_sort_ii/solution.py) |
  | 330 | [Patching Array](/problems/patching-array) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/patching_array/solution.py) |
  | 334 | [Increasing Triplet Subsequence](/problems/increasing-triplet-subsequence) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/increasing_triplet_subsequence/solution.py) |
  | 358 | [Rearrange String k Distance Apart](/problems/rearrange-string-k-distance-apart) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/rearrange_string_k_distance_apart/solution.py) |
  | 376 | [Wiggle Subsequence](/problems/wiggle-subsequence) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/wiggle_subsequence/solution.py) |
  | 397 | [Integer Replacement](/problems/integer-replacement) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/integer_replacement/solution.py) |
  | 402 | [Remove K Digits](/problems/remove-k-digits) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/remove_k_digits/solution.py) |
  | 409 | [Longest Palindrome](/problems/longest-palindrome) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_palindrome/solution.py) |
  | 410 | [Split Array Largest Sum](/problems/split-array-largest-sum) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/split_array_largest_sum/solution.py) |
  | 420 | [Strong Password Checker](/problems/strong-password-checker) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/strong_password_checker/solution.py) |
  | 435 | [Non-overlapping Intervals](/problems/non-overlapping-intervals) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/non_overlapping_intervals/solution.py) |
  | 452 | [Minimum Number of Arrows to Burst Balloons](/problems/minimum-number-of-arrows-to-burst-balloons) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_arrows_to_burst_balloons/solution.py) |
  | 455 | [Assign Cookies](/problems/assign-cookies) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/assign_cookies/solution.py) |
  | 484 | [Find Permutation](/problems/find-permutation) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_permutation/solution.py) |
  | 502 | [IPO](/problems/ipo) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/ipo/solution.py) |
  | 517 | [Super Washing Machines](/problems/super-washing-machines) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/super_washing_machines/solution.py) |
  | 527 | [Word Abbreviation](/problems/word-abbreviation) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_abbreviation/solution.py) |
  | 555 | [Split Concatenated Strings](/problems/split-concatenated-strings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/split_concatenated_strings/solution.py) |
  | 561 | [Array Partition](/problems/array-partition) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/array_partition/solution.py) |
  | 581 | [Shortest Unsorted Continuous Subarray](/problems/shortest-unsorted-continuous-subarray) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_unsorted_continuous_subarray/solution.py) |
  | 605 | [Can Place Flowers](/problems/can-place-flowers) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/can_place_flowers/solution.py) |
  | 611 | [Valid Triangle Number](/problems/valid-triangle-number) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_triangle_number/solution.py) |
  | 621 | [Task Scheduler](/problems/task-scheduler) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/task_scheduler/solution.py) |
  | 624 | [Maximum Distance in Arrays](/problems/maximum-distance-in-arrays) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_distance_in_arrays/solution.py) |
  | 625 | [Minimum Factorization](/problems/minimum-factorization) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_factorization/solution.py) |
  | 630 | [Course Schedule III](/problems/course-schedule-iii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/course_schedule_iii/solution.py) |
  | 632 | [Smallest Range Covering Elements from K Lists](/problems/smallest-range-covering-elements-from-k-lists) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/smallest_range_covering_elements_from_k_lists/solution.py) |
  | 646 | [Maximum Length of Pair Chain](/problems/maximum-length-of-pair-chain) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_length_of_pair_chain/solution.py) |
  | 649 | [Dota2 Senate](/problems/dota2-senate) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/dota2_senate/solution.py) |
  | 659 | [Split Array into Consecutive Subsequences](/problems/split-array-into-consecutive-subsequences) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/split_array_into_consecutive_subsequences/solution.py) |
  | 670 | [Maximum Swap](/problems/maximum-swap) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_swap/solution.py) |
  | 678 | [Valid Parenthesis String](/problems/valid-parenthesis-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_parenthesis_string/solution.py) |
  | 680 | [Valid Palindrome II](/problems/valid-palindrome-ii) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_palindrome_ii/solution.py) |
  | 714 | [Best Time to Buy and Sell Stock with Transaction Fee](/problems/best-time-to-buy-and-sell-stock-with-transaction-fee) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/best_time_to_buy_and_sell_stock_with_transaction_fee/solution.py) |
  | 738 | [Monotone Increasing Digits](/problems/monotone-increasing-digits) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/monotone_increasing_digits/solution.py) |
  | 757 | [Set Intersection Size At Least Two](/problems/set-intersection-size-at-least-two) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/set_intersection_size_at_least_two/solution.py) |
  | 763 | [Partition Labels](/problems/partition-labels) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/partition_labels/solution.py) |
  | 765 | [Couples Holding Hands](/problems/couples-holding-hands) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/couples_holding_hands/solution.py) |
  | 767 | [Reorganize String](/problems/reorganize-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reorganize_string/solution.py) |
  | 768 | [Max Chunks To Make Sorted II](/problems/max-chunks-to-make-sorted-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/max_chunks_to_make_sorted_ii/solution.py) |
  | 769 | [Max Chunks To Make Sorted](/problems/max-chunks-to-make-sorted) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/max_chunks_to_make_sorted/solution.py) |
  | 781 | [Rabbits in Forest](/problems/rabbits-in-forest) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/rabbits_in_forest/solution.py) |
  | 807 | [Max Increase to Keep City Skyline](/problems/max-increase-to-keep-city-skyline) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/max_increase_to_keep_city_skyline/solution.py) |
  | 826 | [Most Profit Assigning Work](/problems/most-profit-assigning-work) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/most_profit_assigning_work/solution.py) |
  | 846 | [Hand of Straights](/problems/hand-of-straights) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/hand_of_straights/solution.py) |
  | 857 | [Minimum Cost to Hire K Workers](/problems/minimum-cost-to-hire-k-workers) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_cost_to_hire_k_workers/solution.py) |
  | 860 | [Lemonade Change](/problems/lemonade-change) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/lemonade_change/solution.py) |
  | 861 | [Score After Flipping Matrix](/problems/score-after-flipping-matrix) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/score_after_flipping_matrix/solution.py) |
  | 870 | [Advantage Shuffle](/problems/advantage-shuffle) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/advantage_shuffle/solution.py) |
  | 871 | [Minimum Number of Refueling Stops](/problems/minimum-number-of-refueling-stops) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_refueling_stops/solution.py) |
  | 881 | [Boats to Save People](/problems/boats-to-save-people) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/boats_to_save_people/solution.py) |
  | 910 | [Smallest Range II](/problems/smallest-range-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/smallest_range_ii/solution.py) |
  | 921 | [Minimum Add to Make Parentheses Valid](/problems/minimum-add-to-make-parentheses-valid) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_add_to_make_parentheses_valid/solution.py) |
  | 926 | [Flip String to Monotone Increasing](/problems/flip-string-to-monotone-increasing) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/flip_string_to_monotone_increasing/solution.py) |
  | 936 | [Stamping The Sequence](/problems/stamping-the-sequence) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/stamping_the_sequence/solution.py) |
  | 942 | [DI String Match](/problems/di-string-match) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/di_string_match/solution.py) |
  | 944 | [Delete Columns to Make Sorted](/problems/delete-columns-to-make-sorted) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/delete_columns_to_make_sorted/solution.py) |
  | 945 | [Minimum Increment to Make Array Unique](/problems/minimum-increment-to-make-array-unique) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_increment_to_make_array_unique/solution.py) |
  | 948 | [Bag of Tokens](/problems/bag-of-tokens) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/bag_of_tokens/solution.py) |
  | 954 | [Array of Doubled Pairs](/problems/array-of-doubled-pairs) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/array_of_doubled_pairs/solution.py) |
  | 955 | [Delete Columns to Make Sorted II](/problems/delete-columns-to-make-sorted-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/delete_columns_to_make_sorted_ii/solution.py) |
  | 969 | [Pancake Sorting](/problems/pancake-sorting) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/pancake_sorting/solution.py) |
  | 976 | [Largest Perimeter Triangle](/problems/largest-perimeter-triangle) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_perimeter_triangle/solution.py) |
  | 984 | [String Without AAA or BBB](/problems/string-without-aaa-or-bbb) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/string_without_aaa_or_bbb/solution.py) |
  | 991 | [Broken Calculator](/problems/broken-calculator) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/broken_calculator/solution.py) |
  | 1029 | [Two City Scheduling](/problems/two-city-scheduling) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/two_city_scheduling/solution.py) |
  | 1055 | [Shortest Way to Form String](/problems/shortest-way-to-form-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_way_to_form_string/solution.py) |
  | 1057 | [Campus Bikes](/problems/campus-bikes) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/campus_bikes/solution.py) |
  | 1058 | [Minimize Rounding Error to Meet Target](/problems/minimize-rounding-error-to-meet-target) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimize_rounding_error_to_meet_target/solution.py) |
  | 1121 | [Divide Array Into Increasing Sequences](/problems/divide-array-into-increasing-sequences) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/divide_array_into_increasing_sequences/solution.py) |
  | 1167 | [Minimum Cost to Connect Sticks](/problems/minimum-cost-to-connect-sticks) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_cost_to_connect_sticks/solution.py) |
  | 1183 | [Maximum Number of Ones](/problems/maximum-number-of-ones) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_number_of_ones/solution.py) |
  | 1196 | [How Many Apples Can You Put into the Basket](/problems/how-many-apples-can-you-put-into-the-basket) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/how_many_apples_can_you_put_into_the_basket/solution.py) |
  | 1383 | [Maximum Performance of a Team](/problems/maximum-performance-of-a-team) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_performance_of_a_team/solution.py) |
  | 1400 | [Construct K Palindrome Strings](/problems/construct-k-palindrome-strings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/construct_k_palindrome_strings/solution.py) |
  | 1405 | [Longest Happy String](/problems/longest-happy-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_happy_string/solution.py) |
  | 1481 | [Least Number of Unique Integers after K Removals](/problems/least-number-of-unique-integers-after-k-removals) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/least_number_of_unique_integers_after_k_removals/solution.py) |
  | 1509 | [Minimum Difference Between Largest and Smallest Value in Three Moves](/problems/minimum-difference-between-largest-and-smallest-value-in-three-moves) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_difference_between_largest_and_smallest_value_in_three_moves/solution.py) |
  | 1526 | [Minimum Number of Increments on Subarrays to Form a Target Array](/problems/minimum-number-of-increments-on-subarrays-to-form-a-target-array) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_increments_on_subarrays_to_form_a_target_array/solution.py) |
  | 1564 | [Put Boxes Into the Warehouse I](/problems/put-boxes-into-the-warehouse-i) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/put_boxes_into_the_warehouse_i/solution.py) |
  | 1578 | [Minimum Time to Make Rope Colorful](/problems/minimum-time-to-make-rope-colorful) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_time_to_make_rope_colorful/solution.py) |
  | 1605 | [Find Valid Matrix Given Row and Column Sums](/problems/find-valid-matrix-given-row-and-column-sums) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_valid_matrix_given_row_and_column_sums/solution.py) |
  | 1642 | [Furthest Building You Can Reach](/problems/furthest-building-you-can-reach) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/furthest_building_you_can_reach/solution.py) |
  | 1647 | [Minimum Deletions to Make Character Frequencies Unique](/problems/minimum-deletions-to-make-character-frequencies-unique) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_deletions_to_make_character_frequencies_unique/solution.py) |
  | 1671 | [Minimum Number of Removals to Make Mountain Array](/problems/minimum-number-of-removals-to-make-mountain-array) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_removals_to_make_mountain_array/solution.py) |
  | 1675 | [Minimize Deviation in Array](/problems/minimize-deviation-in-array) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimize_deviation_in_array/solution.py) |
  | 1717 | [Maximum Score From Removing Substrings](/problems/maximum-score-from-removing-substrings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_score_from_removing_substrings/solution.py) |
  | 1727 | [Largest Submatrix With Rearrangements](/problems/largest-submatrix-with-rearrangements) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_submatrix_with_rearrangements/solution.py) |
  | 1838 | [Frequency of the Most Frequent Element](/problems/frequency-of-the-most-frequent-element) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/frequency_of_the_most_frequent_element/solution.py) |
  | 1846 | [Maximum Element After Decreasing and Rearranging](/problems/maximum-element-after-decreasing-and-rearranging) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_element_after_decreasing_and_rearranging/solution.py) |
  | 1899 | [Merge Triplets to Form Target Triplet](/problems/merge-triplets-to-form-target-triplet) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_triplets_to_form_target_triplet/solution.py) |
  | 1903 | [Largest Odd Number in String](/problems/largest-odd-number-in-string) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_odd_number_in_string/solution.py) |
  | 1921 | [Eliminate Maximum Number of Monsters](/problems/eliminate-maximum-number-of-monsters) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/eliminate_maximum_number_of_monsters/solution.py) |
  | 1963 | [Minimum Number of Swaps to Make the String Balanced](/problems/minimum-number-of-swaps-to-make-the-string-balanced) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_swaps_to_make_the_string_balanced/solution.py) |
  | 1968 | [Array With Elements Not Equal to Average of Neighbors](/problems/array-with-elements-not-equal-to-average-of-neighbors) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/array_with_elements_not_equal_to_average_of_neighbors/solution.py) |
  | 1975 | [Maximum Matrix Sum](/problems/maximum-matrix-sum) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_matrix_sum/solution.py) |
  | 2037 | [Minimum Number of Moves to Seat Everyone](/problems/minimum-number-of-moves-to-seat-everyone) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_moves_to_seat_everyone/solution.py) |
  | 2038 | [Remove Colored Pieces if Both Neighbors are the Same Color](/problems/remove-colored-pieces-if-both-neighbors-are-the-same-color) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/remove_colored_pieces_if_both_neighbors_are_the_same_color/solution.py) |
  | 2064 | [Minimized Maximum of Products Distributed to Any Store](/problems/minimized-maximum-of-products-distributed-to-any-store) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimized_maximum_of_products_distributed_to_any_store/solution.py) |
  | 2116 | [Check if a Parentheses String Can Be Valid](/problems/check-if-a-parentheses-string-can-be-valid) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/check_if_a_parentheses_string_can_be_valid/solution.py) |
  | 2182 | [Construct String With Repeat Limit](/problems/construct-string-with-repeat-limit) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/construct_string_with_repeat_limit/solution.py) |
  | 2285 | [Maximum Total Importance of Roads](/problems/maximum-total-importance-of-roads) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_total_importance_of_roads/solution.py) |
  | 2375 | [Construct Smallest Number From DI String](/problems/construct-smallest-number-from-di-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/construct_smallest_number_from_di_string/solution.py) |
  | 2405 | [Optimal Partition of String](/problems/optimal-partition-of-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/optimal_partition_of_string/solution.py) |
  | 2406 | [Divide Intervals Into Minimum Number of Groups](/problems/divide-intervals-into-minimum-number-of-groups) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/divide_intervals_into_minimum_number_of_groups/solution.py) |
  | 2429 | [Minimize XOR](/problems/minimize-xor) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimize_xor/solution.py) |
  | 2439 | [Minimize Maximum of Array](/problems/minimize-maximum-of-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimize_maximum_of_array/solution.py) |
  | 2486 | [Append Characters to String to Make Subsequence](/problems/append-characters-to-string-to-make-subsequence) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/append_characters_to_string_to_make_subsequence/solution.py) |
  | 2530 | [Maximal Score After Applying K Operations](/problems/maximal-score-after-applying-k-operations) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximal_score_after_applying_k_operations/solution.py) |
  | 2542 | [Maximum Subsequence Score](/problems/maximum-subsequence-score) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_subsequence_score/solution.py) |
  | 2551 | [Put Marbles in Bags](/problems/put-marbles-in-bags) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/put_marbles_in_bags/solution.py) |
  | 2560 | [House Robber IV](/problems/house-robber-iv) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/house_robber_iv/solution.py) |
  | 2601 | [Prime Subtraction Operation](/problems/prime-subtraction-operation) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/prime_subtraction_operation/solution.py) |
  | 2616 | [Minimize the Maximum Difference of Pairs](/problems/minimize-the-maximum-difference-of-pairs) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimize_the_maximum_difference_of_pairs/solution.py) |
  | 2706 | [Buy Two Chocolates](/problems/buy-two-chocolates) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/buy_two_chocolates/solution.py) |
  | 2818 | [Apply Operations to Maximize Score](/problems/apply-operations-to-maximize-score) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/apply_operations_to_maximize_score/solution.py) |
  | 2864 | [Maximum Odd Binary Number](/problems/maximum-odd-binary-number) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_odd_binary_number/solution.py) |
  | 2870 | [Minimum Number of Operations to Make Array Empty](/problems/minimum-number-of-operations-to-make-array-empty) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_operations_to_make_array_empty/solution.py) |
  | 2938 | [Separate Black and White Balls](/problems/separate-black-and-white-balls) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/separate_black_and_white_balls/solution.py) |
  | 2966 | [Divide Array Into Arrays With Max Difference](/problems/divide-array-into-arrays-with-max-difference) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/divide_array_into_arrays_with_max_difference/solution.py) |
  | 2971 | [Find Polygon With the Largest Perimeter](/problems/find-polygon-with-the-largest-perimeter) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_polygon_with_the_largest_perimeter/solution.py) |
  | 3016 | [Minimum Number of Pushes to Type Word II](/problems/minimum-number-of-pushes-to-type-word-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_pushes_to_type_word_ii/solution.py) |
  | 3068 | [Find the Maximum Sum of Node Values](/problems/find-the-maximum-sum-of-node-values) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_maximum_sum_of_node_values/solution.py) |
  | 3434 | [Maximum Frequency After Subarray Operation](/problems/maximum-frequency-after-subarray-operation) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_frequency_after_subarray_operation/solution.py) |
  | 3572 | [Maximize Y-Sum by Picking a Triplet of Distinct X-Values](/problems/maximize-ysum-by-picking-a-triplet-of-distinct-xvalues) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximize_ysum_by_picking_a_triplet_of_distinct_xvalues/solution.py) |
  | 3711 | [Maximum Transactions Without Negative Balance](/problems/maximum-transactions-without-negative-balance) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_transactions_without_negative_balance/solution.py) |
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.