> ## 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 250 in Python, Part 2

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

NeetCode 250 holds 250 problems (60 Easy, 154 Medium, 36 Hard).
NeetCode 250 is the full NeetCode roadmap, the broadest list in this catalog, and coverage here is still growing. Every problem below generates a Python practice environment with a parametrized pytest suite and a tested reference solution.

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

Generate the whole collection into the current directory:

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

<div className="sd-catalog-table">
  | # | Problem | Difficulty | Solution |
  | - | - | - | - |
  | 778 | [Swim in Rising Water](/problems/swim-in-rising-water) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/swim_in_rising_water/solution.py) |
  | 787 | [Cheapest Flights Within K Stops](/problems/cheapest-flights-within-k-stops) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/cheapest_flights_within_k_stops/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) |
  | 853 | [Car Fleet](/problems/car-fleet) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/car_fleet/solution.py) |
  | 860 | [Lemonade Change](/problems/lemonade-change) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/lemonade_change/solution.py) |
  | 867 | [Transpose Matrix](/problems/transpose-matrix) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/transpose_matrix/solution.py) |
  | 875 | [Koko Eating Bananas](/problems/koko-eating-bananas) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/koko_eating_bananas/solution.py) |
  | 877 | [Stone Game](/problems/stone-game) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/stone_game/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) |
  | 895 | [Maximum Frequency Stack](/problems/maximum-frequency-stack) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_frequency_stack/solution.py) |
  | 901 | [Online Stock Span](/problems/online-stock-span) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/online_stock_span/solution.py) |
  | 912 | [Sort an Array](/problems/sort-an-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_an_array/solution.py) |
  | 918 | [Maximum Sum Circular Subarray](/problems/maximum-sum-circular-subarray) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_sum_circular_subarray/solution.py) |
  | 953 | [Verifying an Alien Dictionary](/problems/verifying-an-alien-dictionary) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/verifying_an_alien_dictionary/solution.py) |
  | 973 | [K Closest Points to Origin](/problems/k-closest-points-to-origin) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/k_closest_points_to_origin/solution.py) |
  | 978 | [Longest Turbulent Subarray](/problems/longest-turbulent-subarray) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_turbulent_subarray/solution.py) |
  | 981 | [Time Based Key-Value Store](/problems/time-based-key-value-store) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/time_based_key_value_store/solution.py) |
  | 994 | [Rotting Oranges](/problems/rotting-oranges) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/rotting_oranges/solution.py) |
  | 997 | [Find the Town Judge](/problems/find-the-town-judge) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_town_judge/solution.py) |
  | 1011 | [Capacity To Ship Packages Within D Days](/problems/capacity-to-ship-packages-within-d-days) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/capacity_to_ship_packages_within_d_days/solution.py) |
  | 1046 | [Last Stone Weight](/problems/last-stone-weight) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/last_stone_weight/solution.py) |
  | 1049 | [Last Stone Weight II](/problems/last-stone-weight-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/last_stone_weight_ii/solution.py) |
  | 1071 | [Greatest Common Divisor of Strings](/problems/gcd-of-strings) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/gcd_of_strings/solution.py) |
  | 1094 | [Car Pooling](/problems/car-pooling) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/car_pooling/solution.py) |
  | 1095 | [Find in Mountain Array](/problems/find-in-mountain-array) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_in_mountain_array/solution.py) |
  | 1137 | [N-th Tribonacci Number](/problems/n-th-tribonacci-number) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/n_th_tribonacci_number/solution.py) |
  | 1140 | [Stone Game II](/problems/stone-game-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/stone_game_ii/solution.py) |
  | 1143 | [Longest Common Subsequence](/problems/longest-common-subsequence) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_common_subsequence/solution.py) |
  | 1325 | [Delete Leaves With a Given Value](/problems/delete-leaves-with-a-given-value) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/delete_leaves_with_a_given_value/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) |
  | 1406 | [Stone Game III](/problems/stone-game-iii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/stone_game_iii/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) |
  | 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) |
  | 1489 | [Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree](/problems/find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_critical_and_pseudo_critical_edges_in_minimum_spanning_tree/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) |
  | 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) |
  | 1768 | [Merge Strings Alternately](/problems/merge-strings-alternately) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_strings_alternately/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) |
  | 1851 | [Minimum Interval to Include Each Query](/problems/minimum-interval-to-include-each-query) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_interval_to_include_each_query/solution.py) |
  | 1863 | [Sum of All Subset XOR Totals](/problems/sum-of-all-subset-xor-totals) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sum_of_all_subset_xor_totals/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) |
  | 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) |
  | 1929 | [Concatenation of Array](/problems/concatenation-of-array) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/concatenation_of_array/solution.py) |
  | 2013 | [Detect Squares](/problems/detect-squares) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/detect_squares/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) |
  | 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) |
  | 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) |
  | 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) |
  | 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) |
</div>

Pages: [1](/catalog/neetcode-250), 2


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