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

# Grind 75

> All 75 Grind 75 problems with links to each problem and solution.

Grind 75 holds 75 problems (23 Easy, 43 Medium, 9 Hard).

Generate the whole collection into the current directory:

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

| #    | Problem                                                                                                                                                                                     | Difficulty | Solution                                                                                                                                        |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| 1    | [Two Sum](https://github.com/wislertt/leetcode-py/blob/main/leetcode/two_sum/README.md)                                                                                                     | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/two_sum/solution.py)                                                   |
| 3    | [Longest Substring Without Repeating Characters](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_substring_without_repeating_characters/README.md)                       | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_substring_without_repeating_characters/solution.py)            |
| 5    | [Longest Palindromic Substring](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_palindromic_substring/README.md)                                                         | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_palindromic_substring/solution.py)                             |
| 8    | [String to Integer (atoi)](https://github.com/wislertt/leetcode-py/blob/main/leetcode/string_to_integer_atoi/README.md)                                                                     | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/string_to_integer_atoi/solution.py)                                    |
| 11   | [Container With Most Water](https://github.com/wislertt/leetcode-py/blob/main/leetcode/container_with_most_water/README.md)                                                                 | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/container_with_most_water/solution.py)                                 |
| 15   | [3Sum](https://github.com/wislertt/leetcode-py/blob/main/leetcode/three_sum/README.md)                                                                                                      | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/three_sum/solution.py)                                                 |
| 17   | [Letter Combinations of a Phone Number](https://github.com/wislertt/leetcode-py/blob/main/leetcode/letter_combinations_of_a_phone_number/README.md)                                         | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/letter_combinations_of_a_phone_number/solution.py)                     |
| 20   | [Valid Parentheses](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_parentheses/README.md)                                                                                 | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_parentheses/solution.py)                                         |
| 21   | [Merge Two Sorted Lists](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_two_sorted_lists/README.md)                                                                       | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_two_sorted_lists/solution.py)                                    |
| 23   | [Merge k Sorted Lists](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_k_sorted_lists/README.md)                                                                           | Hard       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_k_sorted_lists/solution.py)                                      |
| 33   | [Search in Rotated Sorted Array](https://github.com/wislertt/leetcode-py/blob/main/leetcode/search_in_rotated_sorted_array/README.md)                                                       | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/search_in_rotated_sorted_array/solution.py)                            |
| 39   | [Combination Sum](https://github.com/wislertt/leetcode-py/blob/main/leetcode/combination_sum/README.md)                                                                                     | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/combination_sum/solution.py)                                           |
| 42   | [Trapping Rain Water](https://github.com/wislertt/leetcode-py/blob/main/leetcode/trapping_rain_water/README.md)                                                                             | Hard       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/trapping_rain_water/solution.py)                                       |
| 46   | [Permutations](https://github.com/wislertt/leetcode-py/blob/main/leetcode/permutations/README.md)                                                                                           | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/permutations/solution.py)                                              |
| 53   | [Maximum Subarray](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_subarray/README.md)                                                                                   | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_subarray/solution.py)                                          |
| 54   | [Spiral Matrix](https://github.com/wislertt/leetcode-py/blob/main/leetcode/spiral_matrix/README.md)                                                                                         | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/spiral_matrix/solution.py)                                             |
| 56   | [Merge Intervals](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_intervals/README.md)                                                                                     | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_intervals/solution.py)                                           |
| 57   | [Insert Interval](https://github.com/wislertt/leetcode-py/blob/main/leetcode/insert_interval/README.md)                                                                                     | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/insert_interval/solution.py)                                           |
| 62   | [Unique Paths](https://github.com/wislertt/leetcode-py/blob/main/leetcode/unique_paths/README.md)                                                                                           | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/unique_paths/solution.py)                                              |
| 67   | [Add Binary](https://github.com/wislertt/leetcode-py/blob/main/leetcode/add_binary/README.md)                                                                                               | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/add_binary/solution.py)                                                |
| 70   | [Climbing Stairs](https://github.com/wislertt/leetcode-py/blob/main/leetcode/climbing_stairs/README.md)                                                                                     | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/climbing_stairs/solution.py)                                           |
| 75   | [Sort Colors](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_colors/README.md)                                                                                             | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_colors/solution.py)                                               |
| 76   | [Minimum Window Substring](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_window_substring/README.md)                                                                   | Hard       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_window_substring/solution.py)                                  |
| 78   | [Subsets](https://github.com/wislertt/leetcode-py/blob/main/leetcode/subsets/README.md)                                                                                                     | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/subsets/solution.py)                                                   |
| 79   | [Word Search](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_search/README.md)                                                                                             | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_search/solution.py)                                               |
| 84   | [Largest Rectangle in Histogram](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_rectangle_in_histogram/README.md)                                                       | Hard       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_rectangle_in_histogram/solution.py)                            |
| 98   | [Validate Binary Search Tree](https://github.com/wislertt/leetcode-py/blob/main/leetcode/validate_binary_search_tree/README.md)                                                             | 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://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_level_order_traversal/README.md)                                                 | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_level_order_traversal/solution.py)                         |
| 104  | [Maximum Depth of Binary Tree](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_depth_of_binary_tree/README.md)                                                           | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_depth_of_binary_tree/solution.py)                              |
| 105  | [Construct Binary Tree from Preorder and Inorder Traversal](https://github.com/wislertt/leetcode-py/blob/main/leetcode/construct_binary_tree_from_preorder_and_inorder_traversal/README.md) | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/construct_binary_tree_from_preorder_and_inorder_traversal/solution.py) |
| 110  | [Balanced Binary Tree](https://github.com/wislertt/leetcode-py/blob/main/leetcode/balanced_binary_tree/README.md)                                                                           | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/balanced_binary_tree/solution.py)                                      |
| 121  | [Best Time to Buy and Sell Stock](https://github.com/wislertt/leetcode-py/blob/main/leetcode/best_time_to_buy_and_sell_stock/README.md)                                                     | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/best_time_to_buy_and_sell_stock/solution.py)                           |
| 125  | [Valid Palindrome](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_palindrome/README.md)                                                                                   | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_palindrome/solution.py)                                          |
| 127  | [Word Ladder](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_ladder/README.md)                                                                                             | Hard       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_ladder/solution.py)                                               |
| 133  | [Clone Graph](https://github.com/wislertt/leetcode-py/blob/main/leetcode/clone_graph/README.md)                                                                                             | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/clone_graph/solution.py)                                               |
| 139  | [Word Break](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_break/README.md)                                                                                               | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_break/solution.py)                                                |
| 141  | [Linked List Cycle](https://github.com/wislertt/leetcode-py/blob/main/leetcode/linked_list_cycle/README.md)                                                                                 | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/linked_list_cycle/solution.py)                                         |
| 146  | [LRU Cache](https://github.com/wislertt/leetcode-py/blob/main/leetcode/lru_cache/README.md)                                                                                                 | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/lru_cache/solution.py)                                                 |
| 150  | [Evaluate Reverse Polish Notation](https://github.com/wislertt/leetcode-py/blob/main/leetcode/evaluate_reverse_polish_notation/README.md)                                                   | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/evaluate_reverse_polish_notation/solution.py)                          |
| 155  | [Min Stack](https://github.com/wislertt/leetcode-py/blob/main/leetcode/min_stack/README.md)                                                                                                 | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/min_stack/solution.py)                                                 |
| 169  | [Majority Element](https://github.com/wislertt/leetcode-py/blob/main/leetcode/majority_element/README.md)                                                                                   | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/majority_element/solution.py)                                          |
| 199  | [Binary Tree Right Side View](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_right_side_view/README.md)                                                             | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_right_side_view/solution.py)                               |
| 200  | [Number of Islands](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_islands/README.md)                                                                                 | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_islands/solution.py)                                         |
| 206  | [Reverse Linked List](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_linked_list/README.md)                                                                             | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_linked_list/solution.py)                                       |
| 207  | [Course Schedule](https://github.com/wislertt/leetcode-py/blob/main/leetcode/course_schedule/README.md)                                                                                     | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/course_schedule/solution.py)                                           |
| 208  | [Implement Trie (Prefix Tree)](https://github.com/wislertt/leetcode-py/blob/main/leetcode/implement_trie_prefix_tree/README.md)                                                             | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/implement_trie_prefix_tree/solution.py)                                |
| 217  | [Contains Duplicate](https://github.com/wislertt/leetcode-py/blob/main/leetcode/contains_duplicate/README.md)                                                                               | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/contains_duplicate/solution.py)                                        |
| 224  | [Basic Calculator](https://github.com/wislertt/leetcode-py/blob/main/leetcode/basic_calculator/README.md)                                                                                   | Hard       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/basic_calculator/solution.py)                                          |
| 226  | [Invert Binary Tree](https://github.com/wislertt/leetcode-py/blob/main/leetcode/invert_binary_tree/README.md)                                                                               | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/invert_binary_tree/solution.py)                                        |
| 230  | [Kth Smallest Element in a BST](https://github.com/wislertt/leetcode-py/blob/main/leetcode/kth_smallest_element_in_a_bst/README.md)                                                         | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/kth_smallest_element_in_a_bst/solution.py)                             |
| 232  | [Implement Queue using Stacks](https://github.com/wislertt/leetcode-py/blob/main/leetcode/implement_queue_using_stacks/README.md)                                                           | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/implement_queue_using_stacks/solution.py)                              |
| 235  | [Lowest Common Ancestor of a Binary Search Tree](https://github.com/wislertt/leetcode-py/blob/main/leetcode/lowest_common_ancestor_of_a_binary_search_tree/README.md)                       | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/lowest_common_ancestor_of_a_binary_search_tree/solution.py)            |
| 236  | [Lowest Common Ancestor of a Binary Tree](https://github.com/wislertt/leetcode-py/blob/main/leetcode/lowest_common_ancestor_of_a_binary_tree/README.md)                                     | 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://github.com/wislertt/leetcode-py/blob/main/leetcode/product_of_array_except_self/README.md)                                                           | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/product_of_array_except_self/solution.py)                              |
| 242  | [Valid Anagram](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_anagram/README.md)                                                                                         | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_anagram/solution.py)                                             |
| 278  | [First Bad Version](https://github.com/wislertt/leetcode-py/blob/main/leetcode/first_bad_version/README.md)                                                                                 | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/first_bad_version/solution.py)                                         |
| 295  | [Find Median from Data Stream](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_median_from_data_stream/README.md)                                                           | 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://github.com/wislertt/leetcode-py/blob/main/leetcode/serialize_and_deserialize_binary_tree/README.md)                                         | Hard       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/serialize_and_deserialize_binary_tree/solution.py)                     |
| 310  | [Minimum Height Trees](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_height_trees/README.md)                                                                           | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_height_trees/solution.py)                                      |
| 322  | [Coin Change](https://github.com/wislertt/leetcode-py/blob/main/leetcode/coin_change/README.md)                                                                                             | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/coin_change/solution.py)                                               |
| 383  | [Ransom Note](https://github.com/wislertt/leetcode-py/blob/main/leetcode/ransom_note/README.md)                                                                                             | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/ransom_note/solution.py)                                               |
| 409  | [Longest Palindrome](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_palindrome/README.md)                                                                               | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_palindrome/solution.py)                                        |
| 416  | [Partition Equal Subset Sum](https://github.com/wislertt/leetcode-py/blob/main/leetcode/partition_equal_subset_sum/README.md)                                                               | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/partition_equal_subset_sum/solution.py)                                |
| 438  | [Find All Anagrams in a String](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_all_anagrams_in_a_string/README.md)                                                         | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_all_anagrams_in_a_string/solution.py)                             |
| 542  | [01 Matrix](https://github.com/wislertt/leetcode-py/blob/main/leetcode/zero_one_matrix/README.md)                                                                                           | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/zero_one_matrix/solution.py)                                           |
| 543  | [Diameter of Binary Tree](https://github.com/wislertt/leetcode-py/blob/main/leetcode/diameter_of_binary_tree/README.md)                                                                     | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/diameter_of_binary_tree/solution.py)                                   |
| 621  | [Task Scheduler](https://github.com/wislertt/leetcode-py/blob/main/leetcode/task_scheduler/README.md)                                                                                       | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/task_scheduler/solution.py)                                            |
| 704  | [Binary Search](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_search/README.md)                                                                                         | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_search/solution.py)                                             |
| 721  | [Accounts Merge](https://github.com/wislertt/leetcode-py/blob/main/leetcode/accounts_merge/README.md)                                                                                       | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/accounts_merge/solution.py)                                            |
| 733  | [Flood Fill](https://github.com/wislertt/leetcode-py/blob/main/leetcode/flood_fill/README.md)                                                                                               | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/flood_fill/solution.py)                                                |
| 876  | [Middle of the Linked List](https://github.com/wislertt/leetcode-py/blob/main/leetcode/middle_of_the_linked_list/README.md)                                                                 | Easy       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/middle_of_the_linked_list/solution.py)                                 |
| 973  | [K Closest Points to Origin](https://github.com/wislertt/leetcode-py/blob/main/leetcode/k_closest_points_to_origin/README.md)                                                               | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/k_closest_points_to_origin/solution.py)                                |
| 981  | [Time Based Key-Value Store](https://github.com/wislertt/leetcode-py/blob/main/leetcode/time_based_key_value_store/README.md)                                                               | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/time_based_key_value_store/solution.py)                                |
| 994  | [Rotting Oranges](https://github.com/wislertt/leetcode-py/blob/main/leetcode/rotting_oranges/README.md)                                                                                     | Medium     | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/rotting_oranges/solution.py)                                           |
| 1235 | [Maximum Profit in Job Scheduling](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_profit_in_job_scheduling/README.md)                                                   | Hard       | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_profit_in_job_scheduling/solution.py)                          |
