You are given an array of strings arr. Return the maximum possible length of a string s formed by concatenating a subsequence of arr such that all characters in s are unique.
You are given two strings s1 and s2 of equal length consisting only of ‘x’ and ‘y’. Your task is to make these two strings equal by swapping characters between the two strings. Return the minimum number of swaps required to make s1 and s2 equal, or return -1 if it is impossible.
You are given a string s containing lowercase English letters and parentheses. Your task is to remove the minimum number of parentheses to make the string valid.
You are given a list of unique product names and a search word. As each character of the search word is typed, you need to suggest up to three products that have a prefix matching the current search word. If there are more than three products with the same prefix, return the three lexicographically smallest products.
Design a CombinationIterator class that generates all combinations of a specified length from a sorted string of distinct lowercase English letters, and allows iterating through them in lexicographical order.
Given a string s, return the maximum number of occurrences of any substring that satisfies the following conditions: The number of unique characters in the substring must be less than or equal to maxLetters, and the substring length must be between minSize and maxSize inclusive.