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

# Trie in Python with Tests

> All 33 Trie LeetCode problems with tested Python solutions.

Trie holds 33 problems (2 Easy, 19 Medium, 12 Hard).
Generate any of them into the current directory with `lcpy gen -n <number>`.

| # | Problem | Difficulty | Solution |
| - | - | - | - |
| 14 | [Longest Common Prefix](https://leetcode-py.wisl.dev/problems/longest-common-prefix) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_common_prefix/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) |
| 140 | [Word Break II](https://leetcode-py.wisl.dev/problems/word-break-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_break_ii/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) |
| 211 | [Design Add and Search Words Data Structure](https://leetcode-py.wisl.dev/problems/design-add-and-search-words-data-structure) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/design_add_and_search_words_data_structure/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) |
| 336 | [Palindrome Pairs](https://leetcode-py.wisl.dev/problems/palindrome-pairs) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/palindrome_pairs/solution.py) |
| 386 | [Lexicographical Numbers](https://leetcode-py.wisl.dev/problems/lexicographical-numbers) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/lexicographical_numbers/solution.py) |
| 421 | [Maximum XOR of Two Numbers in an Array](https://leetcode-py.wisl.dev/problems/maximum-xor-of-two-numbers-in-an-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_xor_of_two_numbers_in_an_array/solution.py) |
| 425 | [Word Squares](https://leetcode-py.wisl.dev/problems/word-squares) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_squares/solution.py) |
| 440 | [K-th Smallest in Lexicographical Order](https://leetcode-py.wisl.dev/problems/k-th-smallest-in-lexicographical-order) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/k_th_smallest_in_lexicographical_order/solution.py) |
| 472 | [Concatenated Words](https://leetcode-py.wisl.dev/problems/concatenated-words) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/concatenated_words/solution.py) |
| 527 | [Word Abbreviation](https://leetcode-py.wisl.dev/problems/word-abbreviation) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_abbreviation/solution.py) |
| 588 | [Design In-Memory File System](https://leetcode-py.wisl.dev/problems/design-in-memory-file-system) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/design_in_memory_file_system/solution.py) |
| 616 | [Add Bold Tag in String](https://leetcode-py.wisl.dev/problems/add-bold-tag-in-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/add_bold_tag_in_string/solution.py) |
| 642 | [Design Search Autocomplete System](https://leetcode-py.wisl.dev/problems/design-search-autocomplete-system) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/design_search_autocomplete_system/solution.py) |
| 648 | [Replace Words](https://leetcode-py.wisl.dev/problems/replace-words) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/replace_words/solution.py) |
| 676 | [Implement Magic Dictionary](https://leetcode-py.wisl.dev/problems/implement-magic-dictionary) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/implement_magic_dictionary/solution.py) |
| 677 | [Map Sum Pairs](https://leetcode-py.wisl.dev/problems/map-sum-pairs) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/map_sum_pairs/solution.py) |
| 692 | [Top K Frequent Words](https://leetcode-py.wisl.dev/problems/top-k-frequent-words) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/top_k_frequent_words/solution.py) |
| 720 | [Longest Word in Dictionary](https://leetcode-py.wisl.dev/problems/longest-word-in-dictionary) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_word_in_dictionary/solution.py) |
| 745 | [Prefix and Suffix Search](https://leetcode-py.wisl.dev/problems/prefix-and-suffix-search) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/prefix_and_suffix_search/solution.py) |
| 758 | [Bold Words in String](https://leetcode-py.wisl.dev/problems/bold-words-in-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/bold_words_in_string/solution.py) |
| 792 | [Number of Matching Subsequences](https://leetcode-py.wisl.dev/problems/number-of-matching-subsequences) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_matching_subsequences/solution.py) |
| 820 | [Short Encoding of Words](https://leetcode-py.wisl.dev/problems/short-encoding-of-words) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/short_encoding_of_words/solution.py) |
| 1166 | [Design File System](https://leetcode-py.wisl.dev/problems/design-file-system) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/design_file_system/solution.py) |
| 1233 | [Remove Sub-Folders from the Filesystem](https://leetcode-py.wisl.dev/problems/remove-sub-folders-from-the-filesystem) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/remove_sub_folders_from_the_filesystem/solution.py) |
| 1268 | [Search Suggestions System](https://leetcode-py.wisl.dev/problems/search-suggestions-system) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/search_suggestions_system/solution.py) |
| 2416 | [Sum of Prefix Scores of Strings](https://leetcode-py.wisl.dev/problems/sum-of-prefix-scores-of-strings) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sum_of_prefix_scores_of_strings/solution.py) |
| 2707 | [Extra Characters in a String](https://leetcode-py.wisl.dev/problems/extra-characters-in-a-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/extra_characters_in_a_string/solution.py) |
| 3042 | [Count Prefix and Suffix Pairs I](https://leetcode-py.wisl.dev/problems/count-prefix-and-suffix-pairs-i) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_prefix_and_suffix_pairs_i/solution.py) |
| 3043 | [Find the Length of the Longest Common Prefix](https://leetcode-py.wisl.dev/problems/find-the-length-of-the-longest-common-prefix) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_length_of_the_longest_common_prefix/solution.py) |
| 3045 | [Count Prefix and Suffix Pairs II](https://leetcode-py.wisl.dev/problems/count-prefix-and-suffix-pairs-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_prefix_and_suffix_pairs_ii/solution.py) |


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