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

# AlgoMaster 75 in Python with Tested Solutions

> All 75 problems in the AlgoMaster 75 list: each generates a tested Python practice environment with a pytest suite and reference solutions.

AlgoMaster 75 holds 75 problems (7 Easy, 53 Medium, 15 Hard).
AlgoMaster 75 is this repository's own curated 75, built for algorithmic mastery across the core interview patterns. Every problem generates a Python practice environment with a parametrized pytest suite and a tested reference solution.

Generate the whole collection into the current directory:

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

| # | Problem | Difficulty | Solution |
| - | - | - | - |
| 2 | [Add Two Numbers](https://leetcode-py.wisl.dev/problems/add-two-numbers) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/add_two_numbers/solution.py) |
| 3 | [Longest Substring Without Repeating Characters](https://leetcode-py.wisl.dev/problems/longest-substring-without-repeating-characters) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_substring_without_repeating_characters/solution.py) |
| 4 | [Median of Two Sorted Arrays](https://leetcode-py.wisl.dev/problems/median-of-two-sorted-arrays) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/median_of_two_sorted_arrays/solution.py) |
| 7 | [Reverse Integer](https://leetcode-py.wisl.dev/problems/reverse-integer) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_integer/solution.py) |
| 11 | [Container With Most Water](https://leetcode-py.wisl.dev/problems/container-with-most-water) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/container_with_most_water/solution.py) |
| 15 | [3Sum](https://leetcode-py.wisl.dev/problems/three-sum) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/three_sum/solution.py) |
| 19 | [Remove Nth Node From End of List](https://leetcode-py.wisl.dev/problems/remove-nth-node-from-end-of-list) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/remove_nth_node_from_end_of_list/solution.py) |
| 20 | [Valid Parentheses](https://leetcode-py.wisl.dev/problems/valid-parentheses) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_parentheses/solution.py) |
| 23 | [Merge k Sorted Lists](https://leetcode-py.wisl.dev/problems/merge-k-sorted-lists) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_k_sorted_lists/solution.py) |
| 24 | [Swap Nodes in Pairs](https://leetcode-py.wisl.dev/problems/swap-nodes-in-pairs) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/swap_nodes_in_pairs/solution.py) |
| 25 | [Reverse Nodes in k-Group](https://leetcode-py.wisl.dev/problems/reverse-nodes-in-k-group) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_nodes_in_k_group/solution.py) |
| 33 | [Search in Rotated Sorted Array](https://leetcode-py.wisl.dev/problems/search-in-rotated-sorted-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/search_in_rotated_sorted_array/solution.py) |
| 34 | [Find First and Last Position of Element in Sorted Array](https://leetcode-py.wisl.dev/problems/find-first-and-last-position-of-element-in-sorted-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_first_and_last_position_of_element_in_sorted_array/solution.py) |
| 41 | [First Missing Positive](https://leetcode-py.wisl.dev/problems/first-missing-positive) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/first_missing_positive/solution.py) |
| 42 | [Trapping Rain Water](https://leetcode-py.wisl.dev/problems/trapping-rain-water) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/trapping_rain_water/solution.py) |
| 45 | [Jump Game II](https://leetcode-py.wisl.dev/problems/jump-game-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/jump_game_ii/solution.py) |
| 46 | [Permutations](https://leetcode-py.wisl.dev/problems/permutations) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/permutations/solution.py) |
| 48 | [Rotate Image](https://leetcode-py.wisl.dev/problems/rotate-image) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/rotate_image/solution.py) |
| 49 | [Group Anagrams](https://leetcode-py.wisl.dev/problems/group-anagrams) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/group_anagrams/solution.py) |
| 53 | [Maximum Subarray](https://leetcode-py.wisl.dev/problems/maximum-subarray) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_subarray/solution.py) |
| 54 | [Spiral Matrix](https://leetcode-py.wisl.dev/problems/spiral-matrix) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/spiral_matrix/solution.py) |
| 56 | [Merge Intervals](https://leetcode-py.wisl.dev/problems/merge-intervals) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_intervals/solution.py) |
| 64 | [Minimum Path Sum](https://leetcode-py.wisl.dev/problems/minimum-path-sum) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_path_sum/solution.py) |
| 75 | [Sort Colors](https://leetcode-py.wisl.dev/problems/sort-colors) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_colors/solution.py) |
| 76 | [Minimum Window Substring](https://leetcode-py.wisl.dev/problems/minimum-window-substring) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_window_substring/solution.py) |
| 78 | [Subsets](https://leetcode-py.wisl.dev/problems/subsets) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/subsets/solution.py) |
| 84 | [Largest Rectangle in Histogram](https://leetcode-py.wisl.dev/problems/largest-rectangle-in-histogram) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_rectangle_in_histogram/solution.py) |
| 94 | [Binary Tree Inorder Traversal](https://leetcode-py.wisl.dev/problems/binary-tree-inorder-traversal) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_inorder_traversal/solution.py) |
| 98 | [Validate Binary Search Tree](https://leetcode-py.wisl.dev/problems/validate-binary-search-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/validate_binary_search_tree/solution.py) |
| 102 | [Binary Tree Level Order Traversal](https://leetcode-py.wisl.dev/problems/binary-tree-level-order-traversal) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_level_order_traversal/solution.py) |
| 124 | [Binary Tree Maximum Path Sum](https://leetcode-py.wisl.dev/problems/binary-tree-maximum-path-sum) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_maximum_path_sum/solution.py) |
| 127 | [Word Ladder](https://leetcode-py.wisl.dev/problems/word-ladder) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_ladder/solution.py) |
| 128 | [Longest Consecutive Sequence](https://leetcode-py.wisl.dev/problems/longest-consecutive-sequence) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_consecutive_sequence/solution.py) |
| 133 | [Clone Graph](https://leetcode-py.wisl.dev/problems/clone-graph) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/clone_graph/solution.py) |
| 139 | [Word Break](https://leetcode-py.wisl.dev/problems/word-break) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_break/solution.py) |
| 142 | [Linked List Cycle II](https://leetcode-py.wisl.dev/problems/linked-list-cycle-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/linked_list_cycle_ii/solution.py) |
| 144 | [Binary Tree Preorder Traversal](https://leetcode-py.wisl.dev/problems/binary-tree-preorder-traversal) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_preorder_traversal/solution.py) |
| 145 | [Binary Tree Postorder Traversal](https://leetcode-py.wisl.dev/problems/binary-tree-postorder-traversal) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_postorder_traversal/solution.py) |
| 146 | [LRU Cache](https://leetcode-py.wisl.dev/problems/lru-cache) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/lru_cache/solution.py) |
| 149 | [Max Points on a Line](https://leetcode-py.wisl.dev/problems/max-points-on-a-line) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/max_points_on_a_line/solution.py) |
| 151 | [Reverse Words in a String](https://leetcode-py.wisl.dev/problems/reverse-words-in-a-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_words_in_a_string/solution.py) |
| 155 | [Min Stack](https://leetcode-py.wisl.dev/problems/min-stack) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/min_stack/solution.py) |
| 169 | [Majority Element](https://leetcode-py.wisl.dev/problems/majority-element) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/majority_element/solution.py) |
| 199 | [Binary Tree Right Side View](https://leetcode-py.wisl.dev/problems/binary-tree-right-side-view) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_right_side_view/solution.py) |
| 200 | [Number of Islands](https://leetcode-py.wisl.dev/problems/number-of-islands) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_islands/solution.py) |
| 208 | [Implement Trie (Prefix Tree)](https://leetcode-py.wisl.dev/problems/implement-trie-prefix-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/implement_trie_prefix_tree/solution.py) |
| 210 | [Course Schedule II](https://leetcode-py.wisl.dev/problems/course-schedule-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/course_schedule_ii/solution.py) |
| 212 | [Word Search II](https://leetcode-py.wisl.dev/problems/word-search-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_search_ii/solution.py) |
| 213 | [House Robber II](https://leetcode-py.wisl.dev/problems/house-robber-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/house_robber_ii/solution.py) |
| 230 | [Kth Smallest Element in a BST](https://leetcode-py.wisl.dev/problems/kth-smallest-element-in-a-bst) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/kth_smallest_element_in_a_bst/solution.py) |
| 236 | [Lowest Common Ancestor of a Binary Tree](https://leetcode-py.wisl.dev/problems/lowest-common-ancestor-of-a-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/lowest_common_ancestor_of_a_binary_tree/solution.py) |
| 238 | [Product of Array Except Self](https://leetcode-py.wisl.dev/problems/product-of-array-except-self) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/product_of_array_except_self/solution.py) |
| 239 | [Sliding Window Maximum](https://leetcode-py.wisl.dev/problems/sliding-window-maximum) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sliding_window_maximum/solution.py) |
| 260 | [Single Number III](https://leetcode-py.wisl.dev/problems/single-number-iii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/single_number_iii/solution.py) |
| 295 | [Find Median from Data Stream](https://leetcode-py.wisl.dev/problems/find-median-from-data-stream) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_median_from_data_stream/solution.py) |
| 297 | [Serialize and Deserialize Binary Tree](https://leetcode-py.wisl.dev/problems/serialize-and-deserialize-binary-tree) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/serialize_and_deserialize_binary_tree/solution.py) |
| 300 | [Longest Increasing Subsequence](https://leetcode-py.wisl.dev/problems/longest-increasing-subsequence) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_increasing_subsequence/solution.py) |
| 322 | [Coin Change](https://leetcode-py.wisl.dev/problems/coin-change) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/coin_change/solution.py) |
| 329 | [Longest Increasing Path in a Matrix](https://leetcode-py.wisl.dev/problems/longest-increasing-path-in-a-matrix) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_increasing_path_in_a_matrix/solution.py) |
| 338 | [Counting Bits](https://leetcode-py.wisl.dev/problems/counting-bits) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/counting_bits/solution.py) |
| 347 | [Top K Frequent Elements](https://leetcode-py.wisl.dev/problems/top-k-frequent-elements) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/top_k_frequent_elements/solution.py) |
| 392 | [Is Subsequence](https://leetcode-py.wisl.dev/problems/is-subsequence) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/is_subsequence/solution.py) |
| 416 | [Partition Equal Subset Sum](https://leetcode-py.wisl.dev/problems/partition-equal-subset-sum) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/partition_equal_subset_sum/solution.py) |
| 435 | [Non-overlapping Intervals](https://leetcode-py.wisl.dev/problems/non-overlapping-intervals) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/non_overlapping_intervals/solution.py) |
| 437 | [Path Sum III](https://leetcode-py.wisl.dev/problems/path-sum-iii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/path_sum_iii/solution.py) |
| 438 | [Find All Anagrams in a String](https://leetcode-py.wisl.dev/problems/find-all-anagrams-in-a-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_all_anagrams_in_a_string/solution.py) |
| 547 | [Number of Provinces](https://leetcode-py.wisl.dev/problems/number-of-provinces) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_provinces/solution.py) |
| 560 | [Subarray Sum Equals K](https://leetcode-py.wisl.dev/problems/subarray-sum-equals-k) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/subarray_sum_equals_k/solution.py) |
| 567 | [Permutation in String](https://leetcode-py.wisl.dev/problems/permutation-in-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/permutation_in_string/solution.py) |
| 729 | [My Calendar I](https://leetcode-py.wisl.dev/problems/my-calendar-i) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/my_calendar_i/solution.py) |
| 785 | [Is Graph Bipartite?](https://leetcode-py.wisl.dev/problems/is-graph-bipartite) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/is_graph_bipartite/solution.py) |
| 787 | [Cheapest Flights Within K Stops](https://leetcode-py.wisl.dev/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) |
| 994 | [Rotting Oranges](https://leetcode-py.wisl.dev/problems/rotting-oranges) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/rotting_oranges/solution.py) |
| 1143 | [Longest Common Subsequence](https://leetcode-py.wisl.dev/problems/longest-common-subsequence) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_common_subsequence/solution.py) |
| 1584 | [Min Cost to Connect All Points](https://leetcode-py.wisl.dev/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) |


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