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

# NeetCode All in Python, Part 5

> All 943 problems in the NeetCode All list: each generates a tested Python practice environment with a pytest suite and reference solutions. Part 5 of 5: problems 801-943.

NeetCode All holds 943 problems (211 Easy, 583 Medium, 149 Hard).
Every NeetCode problem in this catalog: all of NeetCode 150 plus everything added so far from the full roadmap. Generate all of it as tested Python practice environments with one command.

This collection includes every problem in [NeetCode 250](/catalog/neetcode-250).

Generate the whole collection into the current directory:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
lcpy gen -t neetcode
```

<div className="sd-catalog-table">
  | # | Problem | Difficulty | Solution |
  | - | - | - | - |
  | 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) |
  | 2185 | [Counting Words With a Given Prefix](/problems/counting-words-with-a-given-prefix) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/counting_words_with_a_given_prefix/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) |
  | 2206 | [Divide Array Into Equal Pairs](/problems/divide-array-into-equal-pairs) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/divide_array_into_equal_pairs/solution.py) |
  | 2215 | [Find the Difference of Two Arrays](/problems/find-the-difference-of-two-arrays) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_difference_of_two_arrays/solution.py) |
  | 2218 | [Maximum Value of K Coins From Piles](/problems/maximum-value-of-k-coins-from-piles) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_value_of_k_coins_from_piles/solution.py) |
  | 2220 | [Minimum Bit Flips to Convert Number](/problems/minimum-bit-flips-to-convert-number) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_bit_flips_to_convert_number/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) |
  | 2251 | [Number of Flowers in Full Bloom](/problems/number-of-flowers-in-full-bloom) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_flowers_in_full_bloom/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) |
  | 2264 | [Largest 3-Same-Digit Number in String](/problems/largest-3-same-digit-number-in-string) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_3_same_digit_number_in_string/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) |
  | 2290 | [Minimum Obstacle Removal to Reach Corner](/problems/minimum-obstacle-removal-to-reach-corner) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_obstacle_removal_to_reach_corner/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) |
  | 2306 | [Naming a Company](/problems/naming-a-company) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/naming_a_company/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) |
  | 2331 | [Evaluate Boolean Binary Tree](/problems/evaluate-boolean-binary-tree) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/evaluate_boolean_binary_tree/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) |
  | 2373 | [Largest Local Values in a Matrix](/problems/largest-local-values-in-a-matrix) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_local_values_in_a_matrix/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) |
  | 2379 | [Minimum Recolors to Get K Consecutive Black Blocks](/problems/minimum-recolors-to-get-k-consecutive-black-blocks) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_recolors_to_get_k_consecutive_black_blocks/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) |
  | 2392 | [Build a Matrix With Conditions](/problems/build-a-matrix-with-conditions) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/build_a_matrix_with_conditions/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) |
  | 2402 | [Meeting Rooms III](/problems/meeting-rooms-iii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/meeting_rooms_iii/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) |
  | 2416 | [Sum of Prefix Scores of Strings](/problems/sum-of-prefix-scores-of-strings) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sum_of_prefix_scores_of_strings/solution.py) |
  | 2418 | [Sort the People](/problems/sort-the-people) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_the_people/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) |
  | 2421 | [Number of Good Paths](/problems/number-of-good-paths) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_good_paths/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) |
  | 2460 | [Apply Operations to an Array](/problems/apply-operations-to-an-array) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/apply_operations_to_an_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) |
  | 2490 | [Circular Sentence](/problems/circular-sentence) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/circular_sentence/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) |
  | 2493 | [Divide Nodes Into the Maximum Number of Groups](/problems/divide-nodes-into-the-maximum-number-of-groups) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/divide_nodes_into_the_maximum_number_of_groups/solution.py) |
  | 2503 | [Maximum Number of Points From Grid Queries](/problems/maximum-number-of-points-from-grid-queries) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_number_of_points_from_grid_queries/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) |
  | 2534 | [Time Taken to Cross the Door](/problems/time-taken-to-cross-the-door) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/time_taken_to_cross_the_door/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) |
  | 2558 | [Take Gifts From the Richest Pile](/problems/take-gifts-from-the-richest-pile) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/take_gifts_from_the_richest_pile/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) |
  | 2570 | [Merge Two 2D Arrays by Summing Values](/problems/merge-two-2d-arrays-by-summing-values) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_two_2d_arrays_by_summing_values/solution.py) |
  | 2577 | [Minimum Time to Visit a Cell In a Grid](/problems/minimum-time-to-visit-a-cell-in-a-grid) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_time_to_visit_a_cell_in_a_grid/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) |
  | 2678 | [Number of Senior Citizens](/problems/number-of-senior-citizens) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_senior_citizens/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) |
  | 2696 | [Minimum String Length After Removing Substrings](/problems/minimum-string-length-after-removing-substrings) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_string_length_after_removing_substrings/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) |
  | 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) |
  | 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) |
  | 2709 | [Greatest Common Divisor Traversal](/problems/greatest-common-divisor-traversal) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/greatest_common_divisor_traversal/solution.py) |
  | 2742 | [Painting the Walls](/problems/painting-the-walls) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/painting_the_walls/solution.py) |
  | 2751 | [Robot Collisions](/problems/robot-collisions) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/robot_collisions/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) |
  | 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) |
  | 2872 | [Maximum Number of K-Divisible Components](/problems/maximum-number-of-k-divisible-components) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_number_of_k_divisible_components/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) |
  | 2940 | [Find Building Where Alice and Bob Can Meet](/problems/find-building-where-alice-and-bob-can-meet) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_building_where_alice_and_bob_can_meet/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) |
  | 2965 | [Find Missing and Repeated Values](/problems/find-missing-and-repeated-values) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_missing_and_repeated_values/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) |
  | 2976 | [Minimum Cost to Convert String I](/problems/minimum-cost-to-convert-string-i) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_cost_to_convert_string_i/solution.py) |
  | 3011 | [Find if Array Can Be Sorted](/problems/find-if-array-can-be-sorted) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_if_array_can_be_sorted/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) |
  | 3042 | [Count Prefix and Suffix Pairs I](/problems/count-prefix-and-suffix-pairs-i) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_prefix_and_suffix_pairs_i/solution.py) |
  | 3043 | [Find the Length of the Longest Common Prefix](/problems/find-the-length-of-the-longest-common-prefix) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_length_of_the_longest_common_prefix/solution.py) |
  | 3045 | [Count Prefix and Suffix Pairs II](/problems/count-prefix-and-suffix-pairs-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_prefix_and_suffix_pairs_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) |
  | 3097 | [Shortest Subarray With OR at Least K II](/problems/shortest-subarray-with-or-at-least-k-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_subarray_with_or_at_least_k_ii/solution.py) |
  | 3105 | [Longest Strictly Increasing or Strictly Decreasing Subarray](/problems/longest-monotonic-subarray) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_monotonic_subarray/solution.py) |
  | 3108 | [Minimum Cost Walk in Weighted Graph](/problems/minimum-cost-walk-in-weighted-graph) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_cost_walk_in_weighted_graph/solution.py) |
  | 3110 | [Score of a String](/problems/score-of-a-string) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/score_of_a_string/solution.py) |
  | 3133 | [Minimum Array End](/problems/minimum-array-end) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_array_end/solution.py) |
  | 3151 | [Special Array I](/problems/special-array-i) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/special_array_i/solution.py) |
  | 3169 | [Count Days Without Meetings](/problems/count-days-without-meetings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_days_without_meetings/solution.py) |
  | 3174 | [Clear Digits](/problems/clear-digits) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/clear_digits/solution.py) |
  | 3191 | [Minimum Operations to Make Binary Array Elements Equal to One I](/problems/minimum-operations-to-make-binary-array-elements-equal-to-one-i) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_operations_to_make_binary_array_elements_equal_to_one_i/solution.py) |
  | 3199 | [Count Triplets with Even XOR Set Bits I](/problems/count-triplets-with-even-xor-set-bits-i) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_triplets_with_even_xor_set_bits_i/solution.py) |
  | 3203 | [Find Minimum Diameter After Merging Two Trees](/problems/find-minimum-diameter-after-merging-two-trees) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_minimum_diameter_after_merging_two_trees/solution.py) |
  | 3208 | [Alternating Groups II](/problems/alternating-groups-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/alternating_groups_ii/solution.py) |
  | 3217 | [Delete Nodes From Linked List Present in Array](/problems/delete-nodes-from-linked-list-present-in-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/delete_nodes_from_linked_list_present_in_array/solution.py) |
  | 3223 | [Minimum Length of String After Operations](/problems/minimum-length-of-string-after-operations) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_length_of_string_after_operations/solution.py) |
  | 3243 | [Shortest Distance After Road Addition Queries I](/problems/shortest-distance-after-queries-i) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_distance_after_queries_i/solution.py) |
  | 3254 | [Find the Power of K-Size Subarrays I](/problems/find-the-power-of-k-size-subarrays-i) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_power_of_k_size_subarrays_i/solution.py) |
  | 3264 | [Final Array State After K Multiplication Operations I](/problems/final-array-state-after-k-multiplication-operations-i) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/final_array_state_after_k_multiplication_operations_i/solution.py) |
  | 3306 | [Count of Substrings Containing Every Vowel and K Consonants II](/problems/count-of-substrings-containing-every-vowel-and-k-consonants-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_of_substrings_containing_every_vowel_and_k_consonants_ii/solution.py) |
  | 3394 | [Check if Grid can be Cut into Sections](/problems/check-if-grid-can-be-cut-into-sections) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/check_if_grid_can_be_cut_into_sections/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) |
  | 3442 | [Maximum Difference Between Even and Odd Frequency I](/problems/maximum-difference-between-even-and-odd-frequency-i) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_difference_between_even_and_odd_frequency_i/solution.py) |
  | 3481 | [Apply Substitutions](/problems/apply-substitutions) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/apply_substitutions/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>

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


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