Anagram Substrings
Given two strings s0 and s1, return the number of substrings where s1 contains any anagram of s0.
Given two strings s0 and s1, return the number of substrings where s1 contains any anagram of s0.
You are given two non-empty strings a and b that are the same length. Partition them into substrings such that each pair of a and b’s substring is the same s...
You are given three lowercase alphabet strings a, b and target. Strings a and b have the same length and are defined to be equivalent: a[i] = b[i]. For examp...
Given two lowercase alphabet strings a and b, return the length of a minimum substring in a that contains all the characters of b.
You are given a string s consisting of lowercase alphabet characters, digits, and brackets"(" and ")". s encodes a longer string and is represented as concat...
Given a string s and an integer k, repeatedly delete the earliest k consecutive duplicate characters.
Given a lowercase alphabet string s, return the number of palindromic substrings in s.
You are given a lowercase alphabet string s that is a palindrome. Update one character such that s is no longer a palindrome and is lexicographically smallest.
Given two strings a and b, find the minimum edit distance between the two. One edit distance is defined as
Given a string s, return whether all its palindromic substrings have odd lengths.
Given a lowercase alphabet string s, return the minimum number of characters that we need to delete such that the frequency of each character occurs a unique...
Given a string s, return the minimum number of characters needed to be inserted so that the string becomes a palindrome.
Given a string s, return the number of distinct non-empty substrings.
You are given a string s containing 1s and 0s. Given that you can flip at most one "0", return the length of the longest contiguous substring of 1s.
You are given a string s containing lowercase alphabet characters separated by spaces " ". After splitting the string on spaces, return all the words in vert...
You are a given a string s containing "X", "(", and ")". The string has balanced brackets and in between there are some "X"s along with possibly nested brack...
You are given a lowercase alphabet string s and a list of integers shifts. Each element shifts[i] means to shift the first i + 1 letters of s by shifts[i] po...
You are given a lowercase alphabet string s. Return the number of ways to split the string into two strings such that the number of distinct characters in ea...
A distance of a lowercase alphabet character is defined to be its index (1-indexed) in the alphabet. For example "a" is 1, "b" is 2 and "z" is 26. The distan...
Given two lowercase alphabet strings a and b, consider an operation where we delete any character in either string. Return the minimum number of operations r...
Given two strings a and b that represent binary numbers, add them and return their sum, also as a string.
Given two lowercase alphabet strings s1 and s2, determine if s1 is a subsequence of s2.
Given a lowercase alphabet string s and an integer k, you want to divide the string into k disjoint parts such that each part is a palindrome. Return the min...
Given strings a and b, return the length of the shortest string that has both a and b as subsequences.
Given a string s with all lower case characters, find the length of the longest palindromic subsequence in s.
Given a string of parentheses s, return the minimum number of parentheses to be removed to make the string balanced.
Given a lowercase alphabet string s, partition s into as many pieces as possible such that each letter appears in at most one piece and return the sizes of t...
Given two lowercase alphabet strings a and b, return the length of the longest anagram subsequence.
Given a string s containing round, curly, and square open and closing brackets, return whether the brackets are balanced.
Given a string s, determine whether any anagram of s is a palindrome.
Given a string s containing brackets "(" and ")", return the length of the longest subsequence of balanced brackets.
You are given a string s containing "1"s and "0"s. Return the number of substrings that contain only "1"s. Mod the result by 10 ** 9 + 7.
Given two strings s0 and s1, return whether they are anagrams of each other.
You are given a binary string s containing "1"s and "0"s. Consider splitting the string into two non-empty substrings such that a + b = s. The score of this ...
Given a list of strings words and a string letters, return the length of longest string in words that can be made from letters in letters. If no word can be ...
Given a string s and an integer k, rearrange s into k rows so that s can be read vertically (top-down, left to right).
You are given a string s of "a" and "b"s. "a"s can stay "a" or turn into "b", but "b"s can’t change.
You are given two lowercase alphabet strings s and t, both of them the same length. You can pick one character in s and another in t and swap them. Given you...
You are given two strings typed and target. You want to write target, but the keyboard is stuck so some characters may be written 1 or more times. Return whe...
Given lowercase alphabet strings s, and t return whether you can create a 1-to-1 mapping for each letter in s to another letter (could be the same letter) su...
Given two strings a, and b, both representing an integer, add them and return it in the same string representation.
You are given a string s containing "1", "2", "3" and "?". Given that you can replace any “?” with "1", "2" or "3", return the smallest number you can make a...
Given a string s consisting only of "1"s and "0"s, you can delete any two adjacent letters if they are different.
Given a string s, return its run-length encoding. You can assume the string to be encoded have no digits and consists solely of alphabetic characters.
Given a run-length encoded lowercase alphabet string s, implement an iterator which is the decoded version of s:
Given two alphabet (can be lower and/or uppercase) strings s0 and s1, determine if one is a rotation of the other.
You’re given a string s containing letters of three types, R, B, and ..
Given a string numeral representing a Roman numeral, convert it to an integer.
Given a string s of words delimited by spaces, reverse the order of words.
Given a lowercase alphabet string s, return whether it’s a repeating string.
Given a string s, repeatedly delete the earliest consecutive duplicate characters.
Given two strings s0 and s1, return whether you can obtain s1 by removing 1 letter from s0.
Given a lowercase alphabet string s, return the index of the first recurring character in it. If there are no recurring characters, return -1.
Given a string s containing balanced parentheses "(" and ")", split them into the maximum number of balanced groups.
Given a lowercase alphabet string s, return the total number of substrings that contain one unique character.
Given a string s containing brackets ( and ), return the minimum number of brackets that can be inserted so that the brackets are balanced.
Given a string s, return the length of the longest palindromic substring.
Given a lowercase alphabet string s, return the length of the longest substring with same characters.
Given a list of lowercase alphabet strings words, return the longest common prefix.
Given a string s, return the lexicographically smallest string that can be made if you can make at most one swap between two characters in the string.
Given two strings s0 and s1, return the two strings interleaved, starting with s0. If there are leftover characters in a string they should be added to the e...
Given an integer n, return its corresponding Roman numeral.
You are given an alphabet (can be lower or uppercase) string s and two integers i and j where i < j. Let’s say p is an infinite string of s repeating fore...
Given a string lowercase alphabet s, eliminate consecutive duplicate characters from the string and return it.
Given a string s and a character c, return a new list of integers of the same length as s where for each index i its value is set the closest distance of s[i...
Given a string s, return whether it is a palindrome.
You’re given a string s consisting solely of "(" and ")". Return whether the parentheses are balanced.
You are given a string s containing digits from "0" to "9" and lowercase alphabet characters. Return the sum of the numbers found in s.