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

<div className="sd-catalog-table">
  | # | Problem | Difficulty | Solution |
  | - | - | - | - |
  | 2 | [Add Two Numbers](/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](/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](/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](/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](/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](/problems/wildcard-matching) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/wildcard_matching/solution.py) |
  | 50 | [Pow(x, n)](/problems/powx-n) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/powx_n/solution.py) |
  | 60 | [Permutation Sequence](/problems/permutation-sequence) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/permutation_sequence/solution.py) |
  | 143 | [Reorder List](/problems/reorder-list) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reorder_list/solution.py) |
  | 203 | [Remove Linked List Elements](/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](/problems/reverse-linked-list) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_linked_list/solution.py) |
  | 224 | [Basic Calculator](/problems/basic-calculator) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/basic_calculator/solution.py) |
  | 231 | [Power of Two](/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](/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](/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](/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](/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](/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](/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](/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](/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](/problems/power-of-four) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/power_of_four/solution.py) |
  | 390 | [Elimination Game](/problems/elimination-game) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/elimination_game/solution.py) |
  | 394 | [Decode String](/problems/decode-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/decode_string/solution.py) |
  | 439 | [Ternary Expression Parser](/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](/problems/predict-the-winner) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/predict_the_winner/solution.py) |
  | 509 | [Fibonacci Number](/problems/fibonacci-number) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/fibonacci_number/solution.py) |
  | 544 | [Output Contest Matches](/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](/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](/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](/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](/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](/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](/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](/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](/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](/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](/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](/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](/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) |
</div>


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