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

# Segment Tree in Python with Tests

> All 17 Segment Tree LeetCode problems with tested Python solutions.

Segment Tree holds 17 problems (7 Medium, 10 Hard).
Generate any of them into the current directory with `lcpy gen -n <number>`.

| # | Problem | Difficulty | Solution |
| - | - | - | - |
| 218 | [The Skyline Problem](https://leetcode-py.wisl.dev/problems/the-skyline-problem) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/the_skyline_problem/solution.py) |
| 307 | [Range Sum Query - Mutable](https://leetcode-py.wisl.dev/problems/range-sum-query-mutable) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/range_sum_query_mutable/solution.py) |
| 308 | [Range Sum Query 2D - Mutable](https://leetcode-py.wisl.dev/problems/range-sum-query-2d-mutable) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/range_sum_query_2d_mutable/solution.py) |
| 315 | [Count of Smaller Numbers After Self](https://leetcode-py.wisl.dev/problems/count-smaller-numbers-after-self) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_smaller_numbers_after_self/solution.py) |
| 327 | [Count of Range Sum](https://leetcode-py.wisl.dev/problems/count-of-range-sum) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_of_range_sum/solution.py) |
| 406 | [Queue Reconstruction by Height](https://leetcode-py.wisl.dev/problems/queue-reconstruction-by-height) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/queue_reconstruction_by_height/solution.py) |
| 493 | [Reverse Pairs](https://leetcode-py.wisl.dev/problems/reverse-pairs) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_pairs/solution.py) |
| 673 | [Number of Longest Increasing Subsequence](https://leetcode-py.wisl.dev/problems/number-of-longest-increasing-subsequence) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_longest_increasing_subsequence/solution.py) |
| 683 | [K Empty Slots](https://leetcode-py.wisl.dev/problems/k-empty-slots) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/k_empty_slots/solution.py) |
| 699 | [Falling Squares](https://leetcode-py.wisl.dev/problems/falling-squares) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/falling_squares/solution.py) |
| 715 | [Range Module](https://leetcode-py.wisl.dev/problems/range-module) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/range_module/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) |
| 731 | [My Calendar II](https://leetcode-py.wisl.dev/problems/my-calendar-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/my_calendar_ii/solution.py) |
| 732 | [My Calendar III](https://leetcode-py.wisl.dev/problems/my-calendar-iii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/my_calendar_iii/solution.py) |
| 850 | [Rectangle Area II](https://leetcode-py.wisl.dev/problems/rectangle-area-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/rectangle_area_ii/solution.py) |
| 1395 | [Count Number of Teams](https://leetcode-py.wisl.dev/problems/count-number-of-teams) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_number_of_teams/solution.py) |
| 2940 | [Find Building Where Alice and Bob Can Meet](https://leetcode-py.wisl.dev/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) |


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