原文链接: https://leetcode-cn.com/problems/verbal-arithmetic-puzzle 英文原文Given an equation, represented by words on left side and the result on right side. You need to check if the equation is solvable under the following rules: Each character is decoded …
标签详情
字符串 分类
原文链接: https://leetcode-cn.com/problems/decrypt-string-from-alphabet-to-integer-mapping 英文原文Given a string s formed by digits ('0' - '9') and '#' . We want to map s to English lowercase characters as follows: Characters ('a' to 'i') are represented by…
原文链接: https://leetcode-cn.com/problems/minimum-insertion-steps-to-make-a-string-palindrome 英文原文Given a string s. In one step you can insert any character at any index of the string. Return the minimum number of steps to make s palindrome. A Palindrom…
原文链接: https://leetcode-cn.com/problems/minimum-distance-to-type-a-word-using-two-fingers 英文原文 You have a keyboard layout as shown above in the X-Y plane, where each English uppercase letter is located at some coordinate. For example, the letter 'A' i…
原文链接: https://leetcode-cn.com/problems/print-words-vertically 英文原文Given a string s. Return all the words vertically in the same order in which they appear in s. Words are returned as a list of strings, complete with spaces when is necessary. (Trailin…
原文链接: https://leetcode-cn.com/problems/remove-palindromic-subsequences 英文原文You are given a string s consisting only of letters 'a' and 'b'. In a single step you can remove one palindromic subsequence from s. Return the minimum number of steps to make…
原文链接: https://leetcode-cn.com/problems/number-of-substrings-containing-all-three-characters 英文原文Given a string s consisting only of characters a, b and c. Return the number of substrings containing at least one occurrence of all these characters a, b…
原文链接: https://leetcode-cn.com/problems/minimum-number-of-steps-to-make-two-strings-anagram 英文原文Given two equal-size strings s and t. In one step you can choose any character of t and replace it with another character. Return the minimum number of ste…
原文链接: https://leetcode-cn.com/problems/find-the-longest-substring-containing-vowels-in-even-counts 英文原文Given the string s, return the size of the longest substring containing each vowel an even number of times. That is, 'a', 'e', 'i', 'o', and 'u' mu…
原文链接: https://leetcode-cn.com/problems/generate-a-string-with-characters-that-have-odd-counts 英文原文Given an integer n, return a string with n characters such that each character in such string occurs an odd number of times. The returned string must co…
原文链接: https://leetcode-cn.com/problems/construct-k-palindrome-strings 英文原文Given a string s and an integer k. You should construct k non-empty palindrome strings using all the characters in s. Return True if you can use all the characters in s to cons…
原文链接: https://leetcode-cn.com/problems/longest-happy-prefix 英文原文A string is called a happy prefix if is a non-empty prefix which is also a suffix (excluding itself). Given a string s, return the longest happy prefix of s. Return an empty string "" if…
原文链接: https://leetcode-cn.com/problems/design-underground-system 英文原文An underground railway system is keeping track of customer travel times between different stations. They are using this data to calculate the average time it takes to travel from on…
原文链接: https://leetcode-cn.com/problems/find-all-good-strings 英文原文Given the strings s1 and s2 of size n and the string evil, return the number of good strings. A good string has size n, it is alphabetically greater than or equal to s1, it is alphabeti…
原文链接: https://leetcode-cn.com/problems/the-k-th-lexicographical-string-of-all-happy-strings-of-length-n 英文原文A happy string is a string that: consists only of letters of the set ['a', 'b', 'c']. s[i] != s[i + 1] for all values of i from 1 to s.length …
原文链接: https://leetcode-cn.com/problems/number-of-steps-to-reduce-a-number-in-binary-representation-to-one 英文原文Given the binary representation of an integer as a string s, return the number of steps to reduce it to 1 under the following rules: If the …
原文链接: https://leetcode-cn.com/problems/string-matching-in-an-array 英文原文Given an array of string words. Return all strings in words which is substring of another word in any order. String words[i] is substring of words[j], if can be obtained removing …
原文链接: https://leetcode-cn.com/problems/html-entity-parser 英文原文HTML entity parser is the parser that takes HTML code as input and replace all the entities of the special characters by the characters itself. The special characters and their entities fo…
原文链接: https://leetcode-cn.com/problems/check-if-a-string-can-break-another-string 英文原文Given two strings: s1 and s2 with the same size, check if some permutation of string s1 can break some permutation of string s2 or vice-versa. In other words s2 can…
原文链接: https://leetcode-cn.com/problems/reformat-the-string 英文原文Given alphanumeric string s. (Alphanumeric string is a string consisting of lowercase English letters and digits). You have to find a permutation of the string where no letter is followed…
原文链接: https://leetcode-cn.com/problems/display-table-of-food-orders-in-a-restaurant 英文原文Given the array orders, which represents the orders that customers have done in a restaurant. More specifically orders[i]=[customerNamei,tableNumberi,foodItemi] w…
原文链接: https://leetcode-cn.com/problems/minimum-number-of-frogs-croaking 英文原文You are given the string croakOfFrogs, which represents a combination of the string "croak" from different frogs, that is, multiple frogs can croak at the same time, so multi…
原文链接: https://leetcode-cn.com/problems/maximum-score-after-splitting-a-string 英文原文Given a string s of zeros and ones, return the maximum score after splitting the string into two non-empty substrings (i.e. left substring and right substring). The sco…
原文链接: https://leetcode-cn.com/problems/consecutive-characters 英文原文The power of the string is the maximum length of a non-empty substring that contains only one unique character. Given a string s, return the power of s. Example 1: Input: s = "leetcode…
原文链接: https://leetcode-cn.com/problems/destination-city 英文原文You are given the array paths, where paths[i] = [cityAi, cityBi] means there exists a direct path going from cityAi to cityBi. Return the destination city, that is, the city without any path…
原文链接: https://leetcode-cn.com/problems/check-if-a-string-contains-all-binary-codes-of-size-k 英文原文Given a binary string s and an integer k. Return true if every binary code of length k is a substring of s. Otherwise, return false. Example 1: Input: s …
原文链接: https://leetcode-cn.com/problems/rearrange-words-in-a-sentence 英文原文Given a sentence text (A sentence is a string of space-separated words) in the following format: First letter is in upper case. Each word in text are separated by a single space…
原文链接: https://leetcode-cn.com/problems/check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence 英文原文Given a sentence that consists of some words separated by a single space, and a searchWord, check if searchWord is a prefix of any word in sentenc…
原文链接: https://leetcode-cn.com/problems/maximum-number-of-vowels-in-a-substring-of-given-length 英文原文Given a string s and an integer k. Return the maximum number of vowel letters in any substring of s with length k. Vowel letters in English are (a, e, …
原文链接: https://leetcode-cn.com/problems/path-crossing 英文原文Given a string path, where path[i] = 'N', 'S', 'E' or 'W', each representing moving one unit north, south, east, or west, respectively. You start at the origin (0, 0) on a 2D plane and walk on …