632 Smallest Range Covering Elements From K Lists
Smallest Range Covering Elements from K Lists You have k lists of sorted integers in non-decreasing order. Find the smallest range that includes at least one number from each of the k lists. We ...
Smallest Range Covering Elements from K Lists You have k lists of sorted integers in non-decreasing order. Find the smallest range that includes at least one number from each of the k lists. We ...
Minimum Add to Make Parentheses Valid A parentheses string is valid if and only if: It is the empty string, It can be written as AB (A concatenated with B), where A and B are valid strings, or I...
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 ‘]’. ...
Minimum String Length After Removing Substrings You are given a string s consisting only of uppercase English letters. You can apply some operations to this string where, in one operation, you c...
Sentence Similarity III You are given two strings sentence1 and sentence2, each representing a sentence composed of words. A sentence is a list of words that are separated by a single space with ...
Permutation in String Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise. In other words, return true if one of s1’s permutations is the substring of...
Divide Players Into Teams of Equal Skill You are given a positive integer array skill of even length n where skill[i] denotes the skill of the ith player. Divide the players into n / 2 teams of s...
Make Sum Divisible by P Given an array of positive integers nums, remove the smallest subarray (possibly empty) such that the sum of the remaining elements is divisible by p. It is not allowed to...
Rank Transform of an Array Given an array of integers arr, replace each element with its rank. The rank represents how large the element is. The rank has the following rules: Rank is an integer...
Check If Array Pairs Are Divisible by k Given an array of integers arr of even length n and an integer k. We want to divide the array into exactly n / 2 pairs such that the sum of each pair is d...