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

# String in Python with Tests

> All 380 String LeetCode problems with tested Python solutions. Part 1 of 2: problems 1-200.

String holds 380 problems (100 Easy, 201 Medium, 79 Hard).
Generate any of them into the current directory with `lcpy gen -n <number>`.

<div className="sd-catalog-table">
  | # | Problem | Difficulty | Solution |
  | - | - | - | - |
  | 3 | [Longest Substring Without Repeating Characters](/problems/longest-substring-without-repeating-characters) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_substring_without_repeating_characters/solution.py) |
  | 5 | [Longest Palindromic Substring](/problems/longest-palindromic-substring) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_palindromic_substring/solution.py) |
  | 6 | [Zigzag Conversion](/problems/zigzag-conversion) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/zigzag_conversion/solution.py) |
  | 8 | [String to Integer (atoi)](/problems/string-to-integer-atoi) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/string_to_integer_atoi/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) |
  | 12 | [Integer to Roman](/problems/integer-to-roman) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/integer_to_roman/solution.py) |
  | 13 | [Roman to Integer](/problems/roman-to-integer) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/roman_to_integer/solution.py) |
  | 14 | [Longest Common Prefix](/problems/longest-common-prefix) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_common_prefix/solution.py) |
  | 17 | [Letter Combinations of a Phone Number](/problems/letter-combinations-of-a-phone-number) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/letter_combinations_of_a_phone_number/solution.py) |
  | 20 | [Valid Parentheses](/problems/valid-parentheses) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_parentheses/solution.py) |
  | 22 | [Generate Parentheses](/problems/generate-parentheses) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/generate_parentheses/solution.py) |
  | 28 | [Find the Index of the First Occurrence in a String](/problems/find-the-index-of-the-first-occurrence-in-a-string) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_index_of_the_first_occurrence_in_a_string/solution.py) |
  | 30 | [Substring with Concatenation of All Words](/problems/substring-with-concatenation-of-all-words) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/substring_with_concatenation_of_all_words/solution.py) |
  | 32 | [Longest Valid Parentheses](/problems/longest-valid-parentheses) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_valid_parentheses/solution.py) |
  | 38 | [Count and Say](/problems/count-and-say) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_and_say/solution.py) |
  | 43 | [Multiply Strings](/problems/multiply-strings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/multiply_strings/solution.py) |
  | 44 | [Wildcard Matching](/problems/wildcard-matching) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/wildcard_matching/solution.py) |
  | 49 | [Group Anagrams](/problems/group-anagrams) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/group_anagrams/solution.py) |
  | 58 | [Length of Last Word](/problems/length-of-last-word) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/length_of_last_word/solution.py) |
  | 65 | [Valid Number](/problems/valid-number) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_number/solution.py) |
  | 67 | [Add Binary](/problems/add-binary) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/add_binary/solution.py) |
  | 68 | [Text Justification](/problems/text-justification) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/text_justification/solution.py) |
  | 71 | [Simplify Path](/problems/simplify-path) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/simplify_path/solution.py) |
  | 72 | [Edit Distance](/problems/edit-distance) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/edit_distance/solution.py) |
  | 76 | [Minimum Window Substring](/problems/minimum-window-substring) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_window_substring/solution.py) |
  | 79 | [Word Search](/problems/word-search) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_search/solution.py) |
  | 87 | [Scramble String](/problems/scramble-string) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/scramble_string/solution.py) |
  | 91 | [Decode Ways](/problems/decode-ways) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/decode_ways/solution.py) |
  | 93 | [Restore IP Addresses](/problems/restore-ip-addresses) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/restore_ip_addresses/solution.py) |
  | 97 | [Interleaving String](/problems/interleaving-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/interleaving_string/solution.py) |
  | 115 | [Distinct Subsequences](/problems/distinct-subsequences) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/distinct_subsequences/solution.py) |
  | 125 | [Valid Palindrome](/problems/valid-palindrome) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_palindrome/solution.py) |
  | 126 | [Word Ladder II](/problems/word-ladder-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_ladder_ii/solution.py) |
  | 127 | [Word Ladder](/problems/word-ladder) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_ladder/solution.py) |
  | 131 | [Palindrome Partitioning](/problems/palindrome-partitioning) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/palindrome_partitioning/solution.py) |
  | 132 | [Palindrome Partitioning II](/problems/palindrome-partitioning-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/palindrome_partitioning_ii/solution.py) |
  | 139 | [Word Break](/problems/word-break) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_break/solution.py) |
  | 140 | [Word Break II](/problems/word-break-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_break_ii/solution.py) |
  | 151 | [Reverse Words in a String](/problems/reverse-words-in-a-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_words_in_a_string/solution.py) |
  | 159 | [Longest Substring with At Most Two Distinct Characters](/problems/longest-substring-with-at-most-two-distinct-characters) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_substring_with_at_most_two_distinct_characters/solution.py) |
  | 161 | [One Edit Distance](/problems/one-edit-distance) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/one_edit_distance/solution.py) |
  | 165 | [Compare Version Numbers](/problems/compare-version-numbers) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/compare_version_numbers/solution.py) |
  | 166 | [Fraction to Recurring Decimal](/problems/fraction-to-recurring-decimal) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/fraction_to_recurring_decimal/solution.py) |
  | 168 | [Excel Sheet Column Title](/problems/excel-sheet-column-title) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/excel_sheet_column_title/solution.py) |
  | 171 | [Excel Sheet Column Number](/problems/excel-sheet-column-number) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/excel_sheet_column_number/solution.py) |
  | 179 | [Largest Number](/problems/largest-number) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_number/solution.py) |
  | 186 | [Reverse Words in a String II](/problems/reverse-words-in-a-string-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_words_in_a_string_ii/solution.py) |
  | 187 | [Repeated DNA Sequences](/problems/repeated-dna-sequences) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/repeated_dna_sequences/solution.py) |
  | 205 | [Isomorphic Strings](/problems/isomorphic-strings) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/isomorphic_strings/solution.py) |
  | 208 | [Implement Trie (Prefix Tree)](/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](/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](/problems/word-search-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_search_ii/solution.py) |
  | 214 | [Shortest Palindrome](/problems/shortest-palindrome) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_palindrome/solution.py) |
  | 224 | [Basic Calculator](/problems/basic-calculator) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/basic_calculator/solution.py) |
  | 227 | [Basic Calculator II](/problems/basic-calculator-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/basic_calculator_ii/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) |
  | 242 | [Valid Anagram](/problems/valid-anagram) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_anagram/solution.py) |
  | 243 | [Shortest Word Distance](/problems/shortest-word-distance) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_word_distance/solution.py) |
  | 244 | [Shortest Word Distance II](/problems/shortest-word-distance-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_word_distance_ii/solution.py) |
  | 245 | [Shortest Word Distance III](/problems/shortest-word-distance-iii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_word_distance_iii/solution.py) |
  | 246 | [Strobogrammatic Number](/problems/strobogrammatic-number) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/strobogrammatic_number/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) |
  | 249 | [Group Shifted Strings](/problems/group-shifted-strings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/group_shifted_strings/solution.py) |
  | 257 | [Binary Tree Paths](/problems/binary-tree-paths) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_paths/solution.py) |
  | 266 | [Palindrome Permutation](/problems/palindrome-permutation) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/palindrome_permutation/solution.py) |
  | 267 | [Palindrome Permutation II](/problems/palindrome-permutation-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/palindrome_permutation_ii/solution.py) |
  | 269 | [Alien Dictionary](/problems/alien-dictionary) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/alien_dictionary/solution.py) |
  | 271 | [Encode and Decode Strings](/problems/encode-and-decode-strings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/encode_and_decode_strings/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) |
  | 282 | [Expression Add Operators](/problems/expression-add-operators) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/expression_add_operators/solution.py) |
  | 288 | [Unique Word Abbreviation](/problems/unique-word-abbreviation) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/unique_word_abbreviation/solution.py) |
  | 290 | [Word Pattern](/problems/word-pattern) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_pattern/solution.py) |
  | 291 | [Word Pattern II](/problems/word-pattern-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_pattern_ii/solution.py) |
  | 293 | [Flip Game](/problems/flip-game) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/flip_game/solution.py) |
  | 297 | [Serialize and Deserialize Binary Tree](/problems/serialize-and-deserialize-binary-tree) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/serialize_and_deserialize_binary_tree/solution.py) |
  | 299 | [Bulls and Cows](/problems/bulls-and-cows) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/bulls_and_cows/solution.py) |
  | 301 | [Remove Invalid Parentheses](/problems/remove-invalid-parentheses) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/remove_invalid_parentheses/solution.py) |
  | 306 | [Additive Number](/problems/additive-number) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/additive_number/solution.py) |
  | 316 | [Remove Duplicate Letters](/problems/remove-duplicate-letters) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/remove_duplicate_letters/solution.py) |
  | 318 | [Maximum Product of Word Lengths](/problems/maximum-product-of-word-lengths) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_product_of_word_lengths/solution.py) |
  | 320 | [Generalized Abbreviation](/problems/generalized-abbreviation) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/generalized_abbreviation/solution.py) |
  | 331 | [Verify Preorder Serialization of a Binary Tree](/problems/verify-preorder-serialization-of-a-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/verify_preorder_serialization_of_a_binary_tree/solution.py) |
  | 332 | [Reconstruct Itinerary](/problems/reconstruct-itinerary) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reconstruct_itinerary/solution.py) |
  | 336 | [Palindrome Pairs](/problems/palindrome-pairs) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/palindrome_pairs/solution.py) |
  | 340 | [Longest Substring with At Most K Distinct Characters](/problems/longest-substring-with-at-most-k-distinct-characters) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_substring_with_at_most_k_distinct_characters/solution.py) |
  | 344 | [Reverse String](/problems/reverse-string) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_string/solution.py) |
  | 345 | [Reverse Vowels of a String](/problems/reverse-vowels-of-a-string) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_vowels_of_a_string/solution.py) |
  | 358 | [Rearrange String k Distance Apart](/problems/rearrange-string-k-distance-apart) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/rearrange_string_k_distance_apart/solution.py) |
  | 383 | [Ransom Note](/problems/ransom-note) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/ransom_note/solution.py) |
  | 385 | [Mini Parser](/problems/mini-parser) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/mini_parser/solution.py) |
  | 387 | [First Unique Character in a String](/problems/first-unique-character-in-a-string) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/first_unique_character_in_a_string/solution.py) |
  | 388 | [Longest Absolute File Path](/problems/longest-absolute-file-path) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_absolute_file_path/solution.py) |
  | 389 | [Find the Difference](/problems/find-the-difference) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_difference/solution.py) |
  | 392 | [Is Subsequence](/problems/is-subsequence) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/is_subsequence/solution.py) |
  | 394 | [Decode String](/problems/decode-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/decode_string/solution.py) |
  | 395 | [Longest Substring with At Least K Repeating Characters](/problems/longest-substring-with-at-least-k-repeating-characters) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_substring_with_at_least_k_repeating_characters/solution.py) |
  | 399 | [Evaluate Division](/problems/evaluate-division) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/evaluate_division/solution.py) |
  | 402 | [Remove K Digits](/problems/remove-k-digits) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/remove_k_digits/solution.py) |
  | 405 | [Convert a Number to Hexadecimal](/problems/convert-a-number-to-hexadecimal) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/convert_a_number_to_hexadecimal/solution.py) |
  | 408 | [Valid Word Abbreviation](/problems/valid-word-abbreviation) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_word_abbreviation/solution.py) |
  | 409 | [Longest Palindrome](/problems/longest-palindrome) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_palindrome/solution.py) |
  | 411 | [Minimum Unique Word Abbreviation](/problems/minimum-unique-word-abbreviation) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_unique_word_abbreviation/solution.py) |
  | 412 | [Fizz Buzz](/problems/fizz-buzz) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/fizz_buzz/solution.py) |
  | 415 | [Add Strings](/problems/add-strings) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/add_strings/solution.py) |
  | 418 | [Sentence Screen Fitting](/problems/sentence-screen-fitting) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sentence_screen_fitting/solution.py) |
  | 420 | [Strong Password Checker](/problems/strong-password-checker) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/strong_password_checker/solution.py) |
  | 423 | [Reconstruct Original Digits from English](/problems/reconstruct-original-digits-from-english) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reconstruct_original_digits_from_english/solution.py) |
  | 424 | [Longest Repeating Character Replacement](/problems/longest-repeating-character-replacement) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_repeating_character_replacement/solution.py) |
  | 425 | [Word Squares](/problems/word-squares) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_squares/solution.py) |
  | 428 | [Serialize and Deserialize N-ary Tree](/problems/serialize-and-deserialize-n-ary-tree) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/serialize_and_deserialize_n_ary_tree/solution.py) |
  | 433 | [Minimum Genetic Mutation](/problems/minimum-genetic-mutation) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_genetic_mutation/solution.py) |
  | 434 | [Number of Segments in a String](/problems/number-of-segments-in-a-string) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_segments_in_a_string/solution.py) |
  | 438 | [Find All Anagrams in a String](/problems/find-all-anagrams-in-a-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_all_anagrams_in_a_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) |
  | 443 | [String Compression](/problems/string-compression) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/string_compression/solution.py) |
  | 449 | [Serialize and Deserialize BST](/problems/serialize-and-deserialize-bst) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/serialize_and_deserialize_bst/solution.py) |
  | 451 | [Sort Characters By Frequency](/problems/sort-characters-by-frequency) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_characters_by_frequency/solution.py) |
  | 459 | [Repeated Substring Pattern](/problems/repeated-substring-pattern) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/repeated_substring_pattern/solution.py) |
  | 466 | [Count The Repetitions](/problems/count-the-repetitions) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_the_repetitions/solution.py) |
  | 467 | [Unique Substrings in Wraparound String](/problems/unique-substrings-in-wraparound-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/unique_substrings_in_wraparound_string/solution.py) |
  | 468 | [Validate IP Address](/problems/validate-ip-address) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/validate_ip_address/solution.py) |
  | 471 | [Encode String with Shortest Length](/problems/encode-string-with-shortest-length) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/encode_string_with_shortest_length/solution.py) |
  | 472 | [Concatenated Words](/problems/concatenated-words) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/concatenated_words/solution.py) |
  | 474 | [Ones and Zeroes](/problems/ones-and-zeroes) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/ones_and_zeroes/solution.py) |
  | 481 | [Magical String](/problems/magical-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/magical_string/solution.py) |
  | 482 | [License Key Formatting](/problems/license-key-formatting) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/license_key_formatting/solution.py) |
  | 484 | [Find Permutation](/problems/find-permutation) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_permutation/solution.py) |
  | 488 | [Zuma Game](/problems/zuma-game) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/zuma_game/solution.py) |
  | 499 | [The Maze III](/problems/the-maze-iii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/the_maze_iii/solution.py) |
  | 500 | [Keyboard Row](/problems/keyboard-row) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/keyboard_row/solution.py) |
  | 504 | [Base 7](/problems/base-7) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/base_7/solution.py) |
  | 514 | [Freedom Trail](/problems/freedom-trail) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/freedom_trail/solution.py) |
  | 516 | [Longest Palindromic Subsequence](/problems/longest-palindromic-subsequence) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_palindromic_subsequence/solution.py) |
  | 520 | [Detect Capital](/problems/detect-capital) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/detect_capital/solution.py) |
  | 521 | [Longest Uncommon Subsequence I](/problems/longest-uncommon-subsequence-i) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_uncommon_subsequence_i/solution.py) |
  | 522 | [Longest Uncommon Subsequence II](/problems/longest-uncommon-subsequence-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_uncommon_subsequence_ii/solution.py) |
  | 524 | [Longest Word in Dictionary through Deleting](/problems/longest-word-in-dictionary-through-deleting) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_word_in_dictionary_through_deleting/solution.py) |
  | 527 | [Word Abbreviation](/problems/word-abbreviation) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_abbreviation/solution.py) |
  | 535 | [Encode and Decode TinyURL](/problems/encode-and-decode-tinyurl) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/encode_and_decode_tinyurl/solution.py) |
  | 536 | [Construct Binary Tree from String](/problems/construct-binary-tree-from-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/construct_binary_tree_from_string/solution.py) |
  | 537 | [Complex Number Multiplication](/problems/complex-number-multiply) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/complex_number_multiply/solution.py) |
  | 539 | [Minimum Time Difference](/problems/minimum-time-difference) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_time_difference/solution.py) |
  | 541 | [Reverse String II](/problems/reverse-string-ii) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_string_ii/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) |
  | 551 | [Student Attendance Record I](/problems/student-attendance-record-i) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/student_attendance_record_i/solution.py) |
  | 555 | [Split Concatenated Strings](/problems/split-concatenated-strings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/split_concatenated_strings/solution.py) |
  | 556 | [Next Greater Element III](/problems/next-greater-element-iii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/next_greater_element_iii/solution.py) |
  | 557 | [Reverse Words in a String III](/problems/reverse-words-in-a-string-iii) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reverse_words_in_a_string_iii/solution.py) |
  | 564 | [Find the Closest Palindrome](/problems/find-the-closest-palindrome) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_closest_palindrome/solution.py) |
  | 567 | [Permutation in String](/problems/permutation-in-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/permutation_in_string/solution.py) |
  | 583 | [Delete Operation for Two Strings](/problems/delete-operation-for-two-strings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/delete_operation_for_two_strings/solution.py) |
  | 588 | [Design In-Memory File System](/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) |
  | 591 | [Tag Validator](/problems/tag-validator) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/tag_validator/solution.py) |
  | 592 | [Fraction Addition and Subtraction](/problems/fraction-addition-and-subtraction) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/fraction_addition_and_subtraction/solution.py) |
  | 599 | [Minimum Index Sum of Two Lists](/problems/minimum-index-sum-of-two-lists) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_index_sum_of_two_lists/solution.py) |
  | 604 | [Design Compressed String Iterator](/problems/design-compressed-string-iterator) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/design_compressed_string_iterator/solution.py) |
  | 606 | [Construct String from Binary Tree](/problems/construct-string-from-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/construct_string_from_binary_tree/solution.py) |
  | 609 | [Find Duplicate File in System](/problems/find-duplicate-file-in-system) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_duplicate_file_in_system/solution.py) |
  | 616 | [Add Bold Tag in String](/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) |
  | 631 | [Design Excel Sum Formula](/problems/design-excel-sum-formula) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/design_excel_sum_formula/solution.py) |
  | 635 | [Design Log Storage System](/problems/design-log-storage-system) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/design_log_storage_system/solution.py) |
  | 639 | [Decode Ways II](/problems/decode-ways-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/decode_ways_ii/solution.py) |
  | 640 | [Solve the Equation](/problems/solve-the-equation) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/solve_the_equation/solution.py) |
  | 642 | [Design Search Autocomplete System](/problems/design-search-autocomplete-system) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/design_search_autocomplete_system/solution.py) |
  | 647 | [Palindromic Substrings](/problems/palindromic-substrings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/palindromic_substrings/solution.py) |
  | 648 | [Replace Words](/problems/replace-words) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/replace_words/solution.py) |
  | 649 | [Dota2 Senate](/problems/dota2-senate) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/dota2_senate/solution.py) |
  | 657 | [Robot Return to Origin](/problems/robot-return-to-origin) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/robot_return_to_origin/solution.py) |
  | 664 | [Strange Printer](/problems/strange-printer) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/strange_printer/solution.py) |
  | 676 | [Implement Magic Dictionary](/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](/problems/map-sum-pairs) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/map_sum_pairs/solution.py) |
  | 678 | [Valid Parenthesis String](/problems/valid-parenthesis-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_parenthesis_string/solution.py) |
  | 680 | [Valid Palindrome II](/problems/valid-palindrome-ii) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_palindrome_ii/solution.py) |
  | 681 | [Next Closest Time](/problems/next-closest-time) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/next_closest_time/solution.py) |
  | 686 | [Repeated String Match](/problems/repeated-string-match) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/repeated_string_match/solution.py) |
  | 691 | [Stickers to Spell Word](/problems/stickers-to-spell-word) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/stickers_to_spell_word/solution.py) |
  | 692 | [Top K Frequent Words](/problems/top-k-frequent-words) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/top_k_frequent_words/solution.py) |
  | 696 | [Count Binary Substrings](/problems/count-binary-substrings) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_binary_substrings/solution.py) |
  | 709 | [To Lower Case](/problems/to-lower-case) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/to_lower_case/solution.py) |
  | 712 | [Minimum ASCII Delete Sum for Two Strings](/problems/minimum-ascii-delete-sum-for-two-strings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_ascii_delete_sum_for_two_strings/solution.py) |
  | 720 | [Longest Word in Dictionary](/problems/longest-word-in-dictionary) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_word_in_dictionary/solution.py) |
  | 721 | [Accounts Merge](/problems/accounts-merge) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/accounts_merge/solution.py) |
  | 722 | [Remove Comments](/problems/remove-comments) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/remove_comments/solution.py) |
  | 726 | [Number of Atoms](/problems/number-of-atoms) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_atoms/solution.py) |
  | 727 | [Minimum Window Subsequence](/problems/minimum-window-subsequence) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_window_subsequence/solution.py) |
  | 730 | [Count Different Palindromic Subsequences](/problems/count-palindromic-subsequences) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_palindromic_subsequences/solution.py) |
  | 734 | [Sentence Similarity](/problems/sentence-similarity) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sentence_similarity/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) |
  | 737 | [Sentence Similarity II](/problems/sentence-similarity-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sentence_similarity_ii/solution.py) |
  | 745 | [Prefix and Suffix Search](/problems/prefix-and-suffix-search) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/prefix_and_suffix_search/solution.py) |
  | 748 | [Shortest Completing Word](/problems/shortest-completing-word) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_completing_word/solution.py) |
  | 751 | [IP to CIDR](/problems/ip-to-cidr) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/ip_to_cidr/solution.py) |
  | 752 | [Open the Lock](/problems/open-the-lock) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/open_the_lock/solution.py) |
  | 753 | [Cracking the Safe](/problems/cracking-the-safe) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/cracking_the_safe/solution.py) |
  | 756 | [Pyramid Transition Matrix](/problems/pyramid-transition) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/pyramid_transition/solution.py) |
  | 758 | [Bold Words in String](/problems/bold-words-in-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/bold_words_in_string/solution.py) |
  | 761 | [Special Binary String](/problems/special-binary-string) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/special_binary_string/solution.py) |
  | 763 | [Partition Labels](/problems/partition-labels) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/partition_labels/solution.py) |
  | 767 | [Reorganize String](/problems/reorganize-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reorganize_string/solution.py) |
</div>

Pages: 1, [2](/catalog/topics/string-2)


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