> ## 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.

# Medium LeetCode Problems in Python, Part 4

> All 819 Medium LeetCode problems with tested Python solutions. Part 4 of 5: problems 601-800.

Medium holds 819 problems.

<div className="sd-catalog-table">
  | # | Problem | Difficulty | Solution |
  | - | - | - | - |
  | 1334 | [Find the City With the Smallest Number of Neighbors at a Threshold Distance](/problems/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_city_with_the_smallest_number_of_neighbors_at_a_threshold_distance/solution.py) |
  | 1343 | [Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold](/problems/number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_sub_arrays_of_size_k_and_average_greater_than_or_equal_to_threshold/solution.py) |
  | 1358 | [Number of Substrings Containing All Three Characters](/problems/number-of-substrings-containing-all-three-characters) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_substrings_containing_all_three_characters/solution.py) |
  | 1361 | [Validate Binary Tree Nodes](/problems/validate-binary-tree-nodes) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/validate_binary_tree_nodes/solution.py) |
  | 1367 | [Linked List in Binary Tree](/problems/linked-list-in-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/linked_list_in_binary_tree/solution.py) |
  | 1368 | [Minimum Cost to Make at Least One Valid Path in a Grid](/problems/minimum-cost-to-make-at-least-one-valid-path-in-a-grid) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_cost_to_make_at_least_one_valid_path_in_a_grid/solution.py) |
  | 1371 | [Find the Longest Substring Containing Vowels in Even Counts](/problems/find-the-longest-substring-containing-vowels-in-even-counts) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_longest_substring_containing_vowels_in_even_counts/solution.py) |
  | 1376 | [Time Needed to Inform All Employees](/problems/time-needed-to-inform-all-employees) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/time_needed_to_inform_all_employees/solution.py) |
  | 1395 | [Count Number of Teams](/problems/count-number-of-teams) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_number_of_teams/solution.py) |
  | 1396 | [Design Underground System](/problems/design-underground-system) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/design_underground_system/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) |
  | 1415 | [The k-th Lexicographical String of All Happy Strings of Length n](/problems/k-th-lexicographical-string-of-all-happy-strings-of-length-n) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/k_th_lexicographical_string_of_all_happy_strings_of_length_n/solution.py) |
  | 1423 | [Maximum Points You Can Obtain from Cards](/problems/maximum-points-you-can-obtain-from-cards) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_points_you_can_obtain_from_cards/solution.py) |
  | 1428 | [Leftmost Column with at Least a One](/problems/leftmost-column-with-one) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/leftmost_column_with_one/solution.py) |
  | 1429 | [First Unique Number](/problems/first-unique-number) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/first_unique_number/solution.py) |
  | 1438 | [Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit](/problems/longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_continuous_subarray_with_absolute_diff_less_than_or_equal_to_limit/solution.py) |
  | 1442 | [Count Triplets That Can Form Two Arrays of Equal XOR](/problems/count-triplets-that-can-form-two-arrays-of-equal-xor) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_triplets_that_can_form_two_arrays_of_equal_xor/solution.py) |
  | 1443 | [Minimum Time to Collect All Apples in a Tree](/problems/minimum-time-to-collect-all-apples-in-a-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_time_to_collect_all_apples_in_a_tree/solution.py) |
  | 1448 | [Count Good Nodes in Binary Tree](/problems/count-good-nodes-in-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_good_nodes_in_binary_tree/solution.py) |
  | 1456 | [Maximum Number of Vowels in a Substring of Given Length](/problems/maximum-number-of-vowels-in-a-substring-of-given-length) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_number_of_vowels_in_a_substring_of_given_length/solution.py) |
  | 1457 | [Pseudo-Palindromic Paths in a Binary Tree](/problems/pseudo-palindromic-paths-in-a-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/pseudo_palindromic_paths_in_a_binary_tree/solution.py) |
  | 1461 | [Check If a String Contains All Binary Codes of Size K](/problems/check-if-a-string-contains-all-binary-codes-of-size-k) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/check_if_a_string_contains_all_binary_codes_of_size_k/solution.py) |
  | 1462 | [Course Schedule IV](/problems/course-schedule-iv) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/course_schedule_iv/solution.py) |
  | 1466 | [Reorder Routes to Make All Paths Lead to the City Zero](/problems/reorder-routes-to-make-all-paths-lead-to-the-city-zero) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reorder_routes_to_make_all_paths_lead_to_the_city_zero/solution.py) |
  | 1472 | [Design Browser History](/problems/design-browser-history) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/design_browser_history/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) |
  | 1490 | [Clone N-ary Tree](/problems/clone-n-ary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/clone_n_ary_tree/solution.py) |
  | 1498 | [Number of Subsequences That Satisfy the Given Sum Condition](/problems/number-of-subsequences-that-satisfy-the-given-sum-condition) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_subsequences_that_satisfy_the_given_sum_condition/solution.py) |
  | 1506 | [Find Root of N-Ary Tree](/problems/find-root-of-n-ary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_root_of_n_ary_tree/solution.py) |
  | 1508 | [Range Sum of Sorted Subarray Sums](/problems/range-sum-of-sorted-subarray-sums) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/range_sum_of_sorted_subarray_sums/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) |
  | 1514 | [Path with Maximum Probability](/problems/path-with-maximum-probability) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/path_with_maximum_probability/solution.py) |
  | 1522 | [Diameter of N-Ary Tree](/problems/diameter-of-n-ary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/diameter_of_n_ary_tree/solution.py) |
  | 1524 | [Number of Sub-arrays With Odd Sum](/problems/number-of-subarrays-with-odd-sum) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_subarrays_with_odd_sum/solution.py) |
  | 1530 | [Number of Good Leaf Nodes Pairs](/problems/number-of-good-leaf-nodes-pairs) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_good_leaf_nodes_pairs/solution.py) |
  | 1533 | [Find the Index of the Large Integer](/problems/find-the-index-of-the-large-integer) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_index_of_the_large_integer/solution.py) |
  | 1538 | [Guess the Majority in a Hidden Array](/problems/guess-the-majority-in-a-hidden-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/guess_the_majority_in_a_hidden_array/solution.py) |
  | 1545 | [Find Kth Bit in Nth Binary String](/problems/find-kth-bit-in-nth-binary-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_kth_bit_in_nth_binary_string/solution.py) |
  | 1557 | [Minimum Number of Vertices to Reach All Nodes](/problems/minimum-number-of-vertices-to-reach-all-nodes) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_vertices_to_reach_all_nodes/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) |
  | 1570 | [Dot Product of Two Sparse Vectors](/problems/dot-product-of-two-sparse-vectors) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/dot_product_of_two_sparse_vectors/solution.py) |
  | 1574 | [Shortest Subarray to be Removed to Make Array Sorted](/problems/shortest-subarray-to-be-removed-to-make-array-sorted) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_subarray_to_be_removed_to_make_array_sorted/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) |
  | 1584 | [Min Cost to Connect All Points](/problems/min-cost-to-connect-all-points) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/min_cost_to_connect_all_points/solution.py) |
  | 1590 | [Make Sum Divisible by P](/problems/make-sum-divisible-by-p) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/make_sum_divisible_by_p/solution.py) |
  | 1593 | [Split a String Into the Max Number of Unique Substrings](/problems/split-a-string-into-the-max-number-of-unique-substrings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/split_a_string_into_the_max_number_of_unique_substrings/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) |
  | 1609 | [Even Odd Tree](/problems/even-odd-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/even_odd_tree/solution.py) |
  | 1626 | [Best Team With No Conflicts](/problems/best-team-with-no-conflicts) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/best_team_with_no_conflicts/solution.py) |
  | 1631 | [Path With Minimum Effort](/problems/path-with-minimum-effort) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/path_with_minimum_effort/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) |
  | 1650 | [Lowest Common Ancestor of a Binary Tree III](/problems/lowest-common-ancestor-of-a-binary-tree-iii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/lowest_common_ancestor_of_a_binary_tree_iii/solution.py) |
  | 1653 | [Minimum Deletions to Make String Balanced](/problems/minimum-deletions-to-make-string-balanced) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_deletions_to_make_string_balanced/solution.py) |
  | 1658 | [Minimum Operations to Reduce X to Zero](/problems/minimum-operations-to-reduce-x-to-zero) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_operations_to_reduce_x_to_zero/solution.py) |
  | 1669 | [Merge In Between Linked Lists](/problems/merge-in-between-linked-lists) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_in_between_linked_lists/solution.py) |
  | 1685 | [Sum of Absolute Differences in a Sorted Array](/problems/sum-of-absolute-differences-in-a-sorted-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sum_of_absolute_differences_in_a_sorted_array/solution.py) |
  | 1701 | [Average Waiting Time](/problems/average-waiting-time) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/average_waiting_time/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) |
  | 1718 | [Construct the Lexicographically Largest Valid Sequence](/problems/construct-the-lexicographically-largest-valid-sequence) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/construct_the_lexicographically_largest_valid_sequence/solution.py) |
  | 1721 | [Swapping Nodes in a Linked List](/problems/swapping-nodes-in-a-linked-list) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/swapping_nodes_in_a_linked_list/solution.py) |
  | 1726 | [Tuple with Same Product](/problems/tuple-with-same-product) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/tuple_with_same_product/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) |
  | 1730 | [Shortest Path to Get Food](/problems/shortest-path-to-get-food) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_path_to_get_food/solution.py) |
  | 1749 | [Maximum Absolute Sum of Any Subarray](/problems/maximum-absolute-sum-of-any-subarray) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_absolute_sum_of_any_subarray/solution.py) |
  | 1750 | [Minimum Length of String After Deleting Similar Ends](/problems/minimum-length-of-string-after-deleting-similar-ends) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_length_of_string_after_deleting_similar_ends/solution.py) |
  | 1760 | [Minimum Limit of Balls in a Bag](/problems/minimum-limit-of-balls-in-a-bag) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_limit_of_balls_in_a_bag/solution.py) |
  | 1762 | [Buildings With an Ocean View](/problems/buildings-with-an-ocean-view) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/buildings_with_an_ocean_view/solution.py) |
  | 1769 | [Minimum Number of Operations to Move All Balls to Each Box](/problems/minimum-number-of-operations-to-move-all-balls-to-each-box) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_operations_to_move_all_balls_to_each_box/solution.py) |
  | 1780 | [Check if Number is a Sum of Powers of Three](/problems/check-if-number-is-a-sum-of-powers-of-three) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/check_if_number_is_a_sum_of_powers_of_three/solution.py) |
  | 1813 | [Sentence Similarity III](/problems/sentence-similarity-iii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sentence_similarity_iii/solution.py) |
  | 1823 | [Find the Winner of the Circular Game](/problems/find-the-winner-of-the-circular-game) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_winner_of_the_circular_game/solution.py) |
  | 1829 | [Maximum XOR for Each Query](/problems/maximum-xor-for-each-query) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_xor_for_each_query/solution.py) |
  | 1834 | [Single-Threaded CPU](/problems/single-threaded-cpu) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/single_threaded_cpu/solution.py) |
  | 1836 | [Remove Duplicates From an Unsorted Linked List](/problems/remove-duplicates-from-an-unsorted-linked-list) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/remove_duplicates_from_an_unsorted_linked_list/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) |
  | 1845 | [Seat Reservation Manager](/problems/seat-reservation-manager) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/seat_reservation_manager/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) |
  | 1849 | [Splitting a String Into Descending Consecutive Values](/problems/splitting-a-string-into-descending-consecutive-values) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/splitting_a_string_into_descending_consecutive_values/solution.py) |
  | 1856 | [Maximum Subarray Min-Product](/problems/maximum-subarray-min-product) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_subarray_min_product/solution.py) |
  | 1861 | [Rotating the Box](/problems/rotating-the-box) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/rotating_the_box/solution.py) |
  | 1868 | [Product of Two Run-Length Encoded Arrays](/problems/product-of-two-run-length-encoded-arrays) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/product_of_two_run_length_encoded_arrays/solution.py) |
  | 1871 | [Jump Game VII](/problems/jump-game-vii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/jump_game_vii/solution.py) |
  | 1882 | [Process Tasks Using Servers](/problems/process-tasks-using-servers) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/process_tasks_using_servers/solution.py) |
  | 1888 | [Minimum Number of Flips to Make the Binary String Alternating](/problems/minimum-number-of-flips-to-make-the-binary-string-alternating) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_flips_to_make_the_binary_string_alternating/solution.py) |
  | 1891 | [Cutting Ribbons](/problems/cutting-ribbons) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/cutting_ribbons/solution.py) |
  | 1898 | [Maximum Number of Removable Characters](/problems/maximum-number-of-removable-characters) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_number_of_removable_characters/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) |
  | 1905 | [Count Sub Islands](/problems/count-sub-islands) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_sub_islands/solution.py) |
  | 1911 | [Maximum Alternating Subsequence Sum](/problems/maximum-alternating-subsequence-sum) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_alternating_subsequence_sum/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) |
  | 1930 | [Unique Length-3 Palindromic Subsequences](/problems/unique-length-3-palindromic-subsequences) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/unique_length_3_palindromic_subsequences/solution.py) |
  | 1937 | [Maximum Number of Points with Cost](/problems/maximum-number-of-points-with-cost) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_number_of_points_with_cost/solution.py) |
  | 1942 | [The Number of the Smallest Unoccupied Chair](/problems/smallest-unoccupied-chair) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/smallest_unoccupied_chair/solution.py) |
  | 1958 | [Check if Move is Legal](/problems/check-if-move-is-legal) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/check_if_move_is_legal/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) |
  | 1966 | [Binary Searchable Numbers in an Unsorted Array](/problems/binary-searchable-numbers-in-an-unsorted-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_searchable_numbers_in_an_unsorted_array/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) |
  | 1976 | [Number of Ways to Arrive at Destination](/problems/number-of-ways-to-arrive-at-destination) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_ways_to_arrive_at_destination/solution.py) |
  | 1980 | [Find Unique Binary String](/problems/find-unique-binary-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_unique_binary_string/solution.py) |
  | 1985 | [Find the Kth Largest Integer in the Array](/problems/kth-largest-number-in-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/kth_largest_number_in_array/solution.py) |
  | 1993 | [Operations on Tree](/problems/operations-on-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/operations_on_tree/solution.py) |
  | 2001 | [Number of Pairs of Interchangeable Rectangles](/problems/number-of-pairs-of-interchangeable-rectangles) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_pairs_of_interchangeable_rectangles/solution.py) |
  | 2002 | [Maximum Product of the Length of Two Palindromic Subsequences](/problems/maximum-product-of-the-length-of-two-palindromic-subsequences) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_product_of_the_length_of_two_palindromic_subsequences/solution.py) |
  | 2013 | [Detect Squares](/problems/detect-squares) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/detect_squares/solution.py) |
  | 2017 | [Grid Game](/problems/grid-game) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/grid_game/solution.py) |
  | 2021 | [Brightest Position on Street](/problems/brightest-position-on-street) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/brightest_position_on_street/solution.py) |
  | 2028 | [Find Missing Observations](/problems/find-missing-observations) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_missing_observations/solution.py) |
  | 2033 | [Minimum Operations to Make a Uni-Value Grid](/problems/minimum-operations-to-make-a-uni-value-grid) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_operations_to_make_a_uni_value_grid/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) |
  | 2044 | [Count Number of Maximum Bitwise-OR Subsets](/problems/count-number-of-maximum-bitwise-or-subsets) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_number_of_maximum_bitwise_or_subsets/solution.py) |
  | 2058 | [Find the Minimum and Maximum Number of Nodes Between Critical Points](/problems/find-the-minimum-and-maximum-number-of-nodes-between-critical-points) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_minimum_and_maximum_number_of_nodes_between_critical_points/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) |
  | 2070 | [Most Beautiful Item for Each Query](/problems/most-beautiful-item-for-each-query) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/most_beautiful_item_for_each_query/solution.py) |
  | 2096 | [Step-By-Step Directions From a Binary Tree Node to Another](/problems/step-by-step-directions-from-a-binary-tree-node-to-another) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/step_by_step_directions_from_a_binary_tree_node_to_another/solution.py) |
  | 2101 | [Detonate the Maximum Bombs](/problems/detonate-the-maximum-bombs) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/detonate_the_maximum_bombs/solution.py) |
  | 2109 | [Adding Spaces to a String](/problems/adding-spaces-to-a-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/adding_spaces_to_a_string/solution.py) |
  | 2115 | [Find All Possible Recipes from Given Supplies](/problems/find-all-possible-recipes-from-given-supplies) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_all_possible_recipes_from_given_supplies/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) |
  | 2125 | [Number of Laser Beams in a Bank](/problems/number-of-laser-beams-in-a-bank) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_laser_beams_in_a_bank/solution.py) |
  | 2130 | [Maximum Twin Sum of a Linked List](/problems/maximum-twin-sum-of-a-linked-list) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_twin_sum_of_a_linked_list/solution.py) |
  | 2134 | [Minimum Swaps to Group All 1's Together II](/problems/minimum-swaps-to-group-all-1s-together-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_swaps_to_group_all_1s_together_ii/solution.py) |
  | 2140 | [Solving Questions With Brainpower](/problems/solving-questions-with-brainpower) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/solving_questions_with_brainpower/solution.py) |
  | 2149 | [Rearrange Array Elements by Sign](/problems/rearrange-array-elements-by-sign) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/rearrange_array_elements_by_sign/solution.py) |
  | 2161 | [Partition Array According to Given Pivot](/problems/partition-array-according-to-given-pivot) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/partition_array_according_to_given_pivot/solution.py) |
  | 2181 | [Merge Nodes in Between Zeros](/problems/merge-nodes-in-between-zeros) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_nodes_in_between_zeros/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) |
  | 2191 | [Sort the Jumbled Numbers](/problems/sort-the-jumbled-numbers) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_the_jumbled_numbers/solution.py) |
  | 2196 | [Create Binary Tree From Descriptions](/problems/create-binary-tree-from-descriptions) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/create_binary_tree_from_descriptions/solution.py) |
  | 2226 | [Maximum Candies Allocated to K Children](/problems/maximum-candies-allocated-to-k-children) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_candies_allocated_to_k_children/solution.py) |
  | 2257 | [Count Unguarded Cells in the Grid](/problems/count-unguarded-cells-in-the-grid) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_unguarded_cells_in_the_grid/solution.py) |
  | 2270 | [Number of Ways to Split Array](/problems/number-of-ways-to-split-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_ways_to_split_array/solution.py) |
  | 2275 | [Largest Combination With Bitwise AND Greater Than Zero](/problems/largest-combination-with-bitwise-and-greater-than-zero) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_combination_with_bitwise_and_greater_than_zero/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) |
  | 2300 | [Successful Pairs of Spells and Potions](/problems/successful-pairs-of-spells-and-potions) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/successful_pairs_of_spells_and_potions/solution.py) |
  | 2326 | [Spiral Matrix IV](/problems/spiral-matrix-iv) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/spiral_matrix_iv/solution.py) |
  | 2348 | [Number of Zero-Filled Subarrays](/problems/number-of-zero-filled-subarrays) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_zero_filled_subarrays/solution.py) |
  | 2353 | [Design a Food Rating System](/problems/design-a-food-rating-system) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/design_a_food_rating_system/solution.py) |
  | 2359 | [Find Closest Node to Given Two Nodes](/problems/find-closest-node-to-given-two-nodes) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_closest_node_to_given_two_nodes/solution.py) |
  | 2364 | [Count Number of Bad Pairs](/problems/count-number-of-bad-pairs) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_number_of_bad_pairs/solution.py) |
  | 2369 | [Check if There is a Valid Partition For The Array](/problems/check-if-there-is-a-valid-partition-for-the-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/check_if_there_is_a_valid_partition_for_the_array/solution.py) |
  | 2370 | [Longest Ideal Subsequence](/problems/longest-ideal-subsequence) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_ideal_subsequence/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) |
  | 2381 | [Shifting Letters II](/problems/shifting-letters-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shifting_letters_ii/solution.py) |
  | 2390 | [Removing Stars From a String](/problems/removing-stars-from-a-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/removing_stars_from_a_string/solution.py) |
  | 2393 | [Count Strictly Increasing Subarrays](/problems/count-strictly-increasing-subarrays) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_strictly_increasing_subarrays/solution.py) |
  | 2401 | [Longest Nice Subarray](/problems/longest-nice-subarray) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_nice_subarray/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) |
  | 2415 | [Reverse Odd Levels of Binary Tree](/problems/reverse-odd-levels-of-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_odd_levels_of_binary_tree/solution.py) |
  | 2419 | [Longest Subarray With Maximum Bitwise AND](/problems/longest-subarray-with-maximum-bitwise-and) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_subarray_with_maximum_bitwise_and/solution.py) |
  | 2425 | [Bitwise XOR of All Pairings](/problems/bitwise-xor-of-all-pairings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/bitwise_xor_of_all_pairings/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) |
  | 2461 | [Maximum Sum of Distinct Subarrays With Length K](/problems/maximum-sum-of-distinct-subarrays-with-length-k) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_sum_of_distinct_subarrays_with_length_k/solution.py) |
  | 2466 | [Count Ways To Build Good Strings](/problems/count-ways-to-build-good-strings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_ways_to_build_good_strings/solution.py) |
  | 2467 | [Most Profitable Path in a Tree](/problems/most-profitable-path-in-a-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/most_profitable_path_in_a_tree/solution.py) |
  | 2471 | [Minimum Number of Operations to Sort a Binary Tree by Level](/problems/minimum-operations-to-sort-a-binary-tree-by-level) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_operations_to_sort_a_binary_tree_by_level/solution.py) |
  | 2477 | [Minimum Fuel Cost to Report to the Capital](/problems/minimum-fuel-cost-to-report-to-the-capital) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_fuel_cost_to_report_to_the_capital/solution.py) |
  | 2483 | [Minimum Penalty for a Shop](/problems/minimum-penalty-for-a-shop) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_penalty_for_a_shop/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) |
  | 2487 | [Remove Nodes From Linked List](/problems/remove-nodes-from-linked-list) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/remove_nodes_from_linked_list/solution.py) |
  | 2491 | [Divide Players Into Teams of Equal Skill](/problems/divide-players-into-teams-of-equal-skill) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/divide_players_into_teams_of_equal_skill/solution.py) |
  | 2492 | [Minimum Score of a Path Between Two Cities](/problems/minimum-score-of-a-path-between-two-cities) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_score_of_a_path_between_two_cities/solution.py) |
  | 2516 | [Take K of Each Character From Left and Right](/problems/take-k-of-each-character-from-left-and-right) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/take_k_of_each_character_from_left_and_right/solution.py) |
  | 2523 | [Closest Prime Numbers in Range](/problems/closest-prime-numbers-in-range) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/closest_prime_numbers_in_range/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) |
  | 2559 | [Count Vowel Strings in Ranges](/problems/count-vowel-strings-in-ranges) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_vowel_strings_in_ranges/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) |
  | 2563 | [Count the Number of Fair Pairs](/problems/count-the-number-of-fair-pairs) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_the_number_of_fair_pairs/solution.py) |
  | 2579 | [Count Total Number of Colored Cells](/problems/count-total-number-of-colored-cells) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_total_number_of_colored_cells/solution.py) |
  | 2583 | [Kth Largest Sum in a Binary Tree](/problems/kth-largest-sum-in-a-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/kth_largest_sum_in_a_binary_tree/solution.py) |
  | 2594 | [Minimum Time to Repair Cars](/problems/minimum-time-to-repair-cars) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_time_to_repair_cars/solution.py) |
  | 2597 | [The Number of Beautiful Subsets](/problems/the-number-of-beautiful-subsets) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/the_number_of_beautiful_subsets/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) |
  | 2610 | [Convert an Array Into a 2D Array With Conditions](/problems/convert-an-array-into-a-2d-array-with-conditions) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/convert_an_array_into_a_2d_array_with_conditions/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) |
  | 2641 | [Cousins in Binary Tree II](/problems/cousins-in-binary-tree-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/cousins_in_binary_tree_ii/solution.py) |
  | 2658 | [Maximum Number of Fish in a Grid](/problems/maximum-number-of-fish-in-a-grid) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_number_of_fish_in_a_grid/solution.py) |
  | 2683 | [Neighboring Bitwise XOR](/problems/neighboring-bitwise-xor) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/neighboring_bitwise_xor/solution.py) |
  | 2685 | [Count the Number of Complete Components](/problems/count-complete-components) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_complete_components/solution.py) |
  | 2698 | [Find the Punishment Number of an Integer](/problems/find-the-punishment-number-of-an-integer) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_punishment_number_of_an_integer/solution.py) |
  | 2707 | [Extra Characters in a String](/problems/extra-characters-in-a-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/extra_characters_in_a_string/solution.py) |
  | 2779 | [Maximum Beauty of an Array After Applying Operation](/problems/maximum-beauty-of-an-array-after-applying-operation) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_beauty_of_an_array_after_applying_operation/solution.py) |
  | 2780 | [Minimum Index of a Valid Split](/problems/minimum-index-of-a-valid-split) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_index_of_a_valid_split/solution.py) |
  | 2807 | [Insert Greatest Common Divisors in Linked List](/problems/insert-greatest-common-divisors-in-linked-list) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/insert_greatest_common_divisors_in_linked_list/solution.py) |
  | 2812 | [Find the Safest Path in a Grid](/problems/find-the-safest-path-in-a-grid) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_safest_path_in_a_grid/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) |
  | 2914 | [Minimum Number of Changes to Make Binary String Beautiful](/problems/minimum-number-of-changes-to-make-binary-string-beautiful) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_changes_to_make_binary_string_beautiful/solution.py) |
  | 2924 | [Find Champion II](/problems/find-champion-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_champion_ii/solution.py) |
  | 2929 | [Distribute Candies Among Children II](/problems/distribute-candies-among-children-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/distribute_candies_among_children_ii/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) |
  | 2948 | [Make Lexicographically Smallest Array by Swapping Elements](/problems/make-lexicographically-smallest-array-by-swapping-elements) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/make_lexicographically_smallest_array_by_swapping_elements/solution.py) |
  | 2958 | [Length of Longest Subarray With at Most K Frequency](/problems/length-of-longest-subarray-with-at-most-k-frequency) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/length_of_longest_subarray_with_at_most_k_frequency/solution.py) |
  | 2962 | [Count Subarrays Where Max Element Appears at Least K Times](/problems/count-subarrays-where-max-element-appears-at-least-k-times) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_subarrays_where_max_element_appears_at_least_k_times/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) |
</div>

Pages: [1](/catalog/medium), [2](/catalog/medium-2), [3](/catalog/medium-3), 4, [5](/catalog/medium-5)


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