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

# Recursion in Python with Tests

> All 40 Recursion LeetCode problems with tested Python solutions.

Recursion holds 40 problems (8 Easy, 19 Medium, 13 Hard).
Generate any of them into the current directory with `lcpy gen -n <number>`.

| # | 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) |
| 10 | [Regular Expression Matching](https://leetcode-py.wisl.dev/problems/regular-expression-matching) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/regular_expression_matching/solution.py) |
| 21 | [Merge Two Sorted Lists](https://leetcode-py.wisl.dev/problems/merge-two-sorted-lists) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_two_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) |
| 44 | [Wildcard Matching](https://leetcode-py.wisl.dev/problems/wildcard-matching) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/wildcard_matching/solution.py) |
| 50 | [Pow(x, n)](https://leetcode-py.wisl.dev/problems/powx-n) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/powx_n/solution.py) |
| 60 | [Permutation Sequence](https://leetcode-py.wisl.dev/problems/permutation-sequence) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/permutation_sequence/solution.py) |
| 143 | [Reorder List](https://leetcode-py.wisl.dev/problems/reorder-list) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reorder_list/solution.py) |
| 203 | [Remove Linked List Elements](https://leetcode-py.wisl.dev/problems/remove-linked-list-elements) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/remove_linked_list_elements/solution.py) |
| 206 | [Reverse Linked List](https://leetcode-py.wisl.dev/problems/reverse-linked-list) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_linked_list/solution.py) |
| 224 | [Basic Calculator](https://leetcode-py.wisl.dev/problems/basic-calculator) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/basic_calculator/solution.py) |
| 231 | [Power of Two](https://leetcode-py.wisl.dev/problems/power-of-two) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/power_of_two/solution.py) |
| 233 | [Number of Digit One](https://leetcode-py.wisl.dev/problems/number-of-digit-one) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_digit_one/solution.py) |
| 234 | [Palindrome Linked List](https://leetcode-py.wisl.dev/problems/palindrome-linked-list) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/palindrome_linked_list/solution.py) |
| 241 | [Different Ways to Add Parentheses](https://leetcode-py.wisl.dev/problems/different-ways-to-add-parentheses) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/different_ways_to_add_parentheses/solution.py) |
| 247 | [Strobogrammatic Number II](https://leetcode-py.wisl.dev/problems/strobogrammatic-number-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/strobogrammatic_number_ii/solution.py) |
| 248 | [Strobogrammatic Number III](https://leetcode-py.wisl.dev/problems/strobogrammatic-number-iii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/strobogrammatic_number_iii/solution.py) |
| 255 | [Verify Preorder Sequence in Binary Search Tree](https://leetcode-py.wisl.dev/problems/verify-preorder-sequence-in-binary-search-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/verify_preorder_sequence_in_binary_search_tree/solution.py) |
| 273 | [Integer to English Words](https://leetcode-py.wisl.dev/problems/integer-to-english-words) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/integer_to_english_words/solution.py) |
| 326 | [Power of Three](https://leetcode-py.wisl.dev/problems/power-of-three) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/power_of_three/solution.py) |
| 342 | [Power of Four](https://leetcode-py.wisl.dev/problems/power-of-four) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/power_of_four/solution.py) |
| 390 | [Elimination Game](https://leetcode-py.wisl.dev/problems/elimination-game) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/elimination_game/solution.py) |
| 394 | [Decode String](https://leetcode-py.wisl.dev/problems/decode-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/decode_string/solution.py) |
| 439 | [Ternary Expression Parser](https://leetcode-py.wisl.dev/problems/ternary-expression-parser) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/ternary_expression_parser/solution.py) |
| 486 | [Predict the Winner](https://leetcode-py.wisl.dev/problems/predict-the-winner) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/predict_the_winner/solution.py) |
| 509 | [Fibonacci Number](https://leetcode-py.wisl.dev/problems/fibonacci-number) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/fibonacci_number/solution.py) |
| 544 | [Output Contest Matches](https://leetcode-py.wisl.dev/problems/output-contest-matches) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/output_contest_matches/solution.py) |
| 736 | [Parse Lisp Expression](https://leetcode-py.wisl.dev/problems/parse-lisp-expression) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/parse_lisp_expression/solution.py) |
| 770 | [Basic Calculator IV](https://leetcode-py.wisl.dev/problems/basic-calculator-iv) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/basic_calculator_iv/solution.py) |
| 772 | [Basic Calculator III](https://leetcode-py.wisl.dev/problems/basic-calculator-iii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/basic_calculator_iii/solution.py) |
| 779 | [K-th Symbol in Grammar](https://leetcode-py.wisl.dev/problems/kth-symbol-in-grammar) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/kth_symbol_in_grammar/solution.py) |
| 894 | [All Possible Full Binary Trees](https://leetcode-py.wisl.dev/problems/all-possible-full-binary-trees) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/all_possible_full_binary_trees/solution.py) |
| 1106 | [Parsing A Boolean Expression](https://leetcode-py.wisl.dev/problems/parsing-a-boolean-expression) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/parsing_a_boolean_expression/solution.py) |
| 1265 | [Print Immutable Linked List in Reverse](https://leetcode-py.wisl.dev/problems/print-immutable-linked-list-in-reverse) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/print_immutable_linked_list_in_reverse/solution.py) |
| 1545 | [Find Kth Bit in Nth Binary String](https://leetcode-py.wisl.dev/problems/find-kth-bit-in-nth-binary-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_kth_bit_in_nth_binary_string/solution.py) |
| 1611 | [Minimum One Bit Operations to Make Integers Zero](https://leetcode-py.wisl.dev/problems/minimum-one-bit-operations-to-make-integers-zero) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_one_bit_operations_to_make_integers_zero/solution.py) |
| 1780 | [Check if Number is a Sum of Powers of Three](https://leetcode-py.wisl.dev/problems/check-if-number-is-a-sum-of-powers-of-three) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/check_if_number_is_a_sum_of_powers_of_three/solution.py) |
| 1823 | [Find the Winner of the Circular Game](https://leetcode-py.wisl.dev/problems/find-the-winner-of-the-circular-game) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_winner_of_the_circular_game/solution.py) |
| 2487 | [Remove Nodes From Linked List](https://leetcode-py.wisl.dev/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) |


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