原文链接: https://leetcode-cn.com/problems/minimum-deletions-to-make-character-frequencies-unique 英文原文A string s is called good if there are no two different characters in s that have the same frequency. Given a string s, return the minimum number of cha…
标签详情
字符串 分类
原文链接: https://leetcode-cn.com/problems/determine-if-two-strings-are-close 英文原文Two strings are considered close if you can attain one from the other using the following operations: Operation 1: Swap any two existing characters. <ul> <li>For example, <…
原文链接: https://leetcode-cn.com/problems/check-if-two-string-arrays-are-equivalent 英文原文Given two string arrays word1 and word2, return true if the two arrays represent the same string, and false otherwise. A string is represented by an array if the arr…
原文链接: https://leetcode-cn.com/problems/smallest-string-with-a-given-numeric-value 英文原文The numeric value of a lowercase character is defined as its position (1-indexed) in the alphabet, so the numeric value of a is 1, the numeric value of b is 2, the …
原文链接: https://leetcode-cn.com/problems/splitting-a-string-into-descending-consecutive-values 英文原文You are given a string s that consists of only digits. Check if we can split s into two or more non-empty substrings such that the numerical values of th…
原文链接: https://leetcode-cn.com/problems/minimum-adjacent-swaps-to-reach-the-kth-smallest-number 英文原文You are given a string num, representing a large integer, and an integer k. We call some integer wonderful if it is a permutation of the digits in num …
原文链接: https://leetcode-cn.com/problems/substrings-of-size-three-with-distinct-characters 英文原文A string is good if there are no repeated characters. Given a string s, return the number of good substrings of length three in s. Note that if th…
原文链接: https://leetcode-cn.com/problems/minimum-number-of-swaps-to-make-the-binary-string-alternating 英文原文Given a binary string s, return the minimum number of character swaps to make it alternating, or -1 if it is impossible. The string is called alt…
原文链接: https://leetcode-cn.com/problems/longer-contiguous-segments-of-ones-than-zeros 英文原文Given a binary string s, return true if the longest contiguous segment of 1's is strictly longer than the longest contiguous segment of 0's in s, or return false…
原文链接: https://leetcode-cn.com/problems/minimum-cost-to-change-the-final-value-of-expression 英文原文You are given a valid boolean expression as a string expression consisting of the characters '1','0','&' (bitwise AND operator),'|' (bitwise OR operator),…
原文链接: https://leetcode-cn.com/problems/check-if-word-equals-summation-of-two-words 英文原文The letter value of a letter is its position in the alphabet starting from 0 (i.e. 'a' -> 0, 'b' -> 1, 'c' -> 2, etc.). The numerical value of some string of lower…
原文链接: https://leetcode-cn.com/problems/maximum-value-after-insertion 英文原文You are given a very large integer n, represented as a string, and an integer digit x. The digits in n and the digit x are in the inclusive range [1, 9], and n may represe…
原文链接: https://leetcode-cn.com/problems/minimum-number-of-flips-to-make-the-binary-string-alternating 英文原文You are given a binary string s. You are allowed to perform two types of operations on the string in any sequence: Type-1: Remove the character a…
原文链接: https://leetcode-cn.com/problems/remove-all-occurrences-of-a-substring 英文原文Given two strings s and part, perform the following operation on s until all occurrences of the substring part are removed: Find the leftmost occurrence of the substring…
原文链接: https://leetcode-cn.com/problems/redistribute-characters-to-make-all-strings-equal 英文原文You are given an array of strings words (0-indexed). In one operation, pick two distinct indices i and j, where words[i] is a non-empty string, and move any …
原文链接: https://leetcode-cn.com/problems/maximum-number-of-removable-characters 英文原文You are given two strings s and p where p is a subsequence of s. You are also given a distinct 0-indexed integer array removable containing a subset of indices of s (s …
原文链接: https://leetcode-cn.com/problems/largest-odd-number-in-string 英文原文You are given a string num, representing a large integer. Return the largest-valued odd integer (as a string) that is a non-empty substring of num, or an empty string "" if no od…
原文链接: https://leetcode-cn.com/problems/the-number-of-full-rounds-you-have-played 英文原文A new online video game has been released, and in this video game, there are 15-minute rounds scheduled every quarter-hour period. This means that at HH:00, HH:15, H…
原文链接: https://leetcode-cn.com/problems/number-of-wonderful-substrings 英文原文A wonderful string is a string where at most one letter appears an odd number of times. For example, "ccjjc" and "abab" are wonderful, but "ab" is not. Given a string word that…
原文链接: https://leetcode-cn.com/problems/check-if-all-characters-have-equal-number-of-occurrences 英文原文Given a string s, return true if s is a good string, or false otherwise. A string s is good if all the characters that appear in s have the same numbe…
原文链接: https://leetcode-cn.com/problems/unique-length-3-palindromic-subsequences 英文原文Given a string s, return the number of unique palindromes of length three that are a subsequence of s. Note that even if there are multiple ways to obtain the same su…
原文链接: https://leetcode-cn.com/problems/sum-of-digits-of-string-after-convert 英文原文You are given a string s consisting of lowercase English letters, and an integer k. First, convert s into an integer by replacing each letter with its position in the al…
原文链接: https://leetcode-cn.com/problems/largest-number-after-mutating-substring 英文原文You are given a string num, which represents a large integer. You are also given a 0-indexed integer array change of length 10 that maps each digit 0-9 to another digi…
原文链接: https://leetcode-cn.com/problems/delete-duplicate-folders-in-system 英文原文Due to a bug, there are many duplicate folders in a file system. You are given a 2D array paths, where paths[i] is an array representing an absolute path to the ith folder …
原文链接: https://leetcode-cn.com/problems/minimum-time-to-type-word-using-special-typewriter 英文原文There is a special typewriter with lowercase English letters 'a' to 'z' arranged in a circle with a pointer. A character can only be typed if the pointer is…
原文链接: https://leetcode-cn.com/problems/number-of-ways-to-separate-numbers 英文原文You wrote down many positive integers in a string called num. However, you realized that you forgot to add commas to seperate the different numbers. You remember that the l…
原文链接: https://leetcode-cn.com/problems/check-if-string-is-a-prefix-of-array 英文原文Given a string s and an array of strings words, determine whether s is a prefix string of words. A string s is a prefix string of words if s can be made by concatenating …
原文链接: https://leetcode-cn.com/problems/minimum-number-of-swaps-to-make-the-string-balanced 英文原文You are given a 0-indexed string s of even length n. The string consists of exactly n / 2 opening brackets '[' and n / 2 closing brackets ']'. A string is …
原文链接: https://leetcode-cn.com/problems/number-of-strings-that-appear-as-substrings-in-word 英文原文Given an array of strings patterns and a string word, return the number of strings in patterns that exist as a substring in word. A substring is a contiguo…
原文链接: https://leetcode-cn.com/problems/find-unique-binary-string 英文原文Given an array of strings nums containing n unique binary strings each of length n, return a binary string of length n that does not appear in nums. If there are multiple answers, y…