Given an array of integers nums and a list of queries, where each query is defined as a subarray nums[li...ri], compute the minimum absolute difference between any two distinct elements in that subarray. If all elements in the subarray are the same, return -1.
A string is considered wonderful if at most one letter appears an odd number of times. Given a string word consisting of the first ten lowercase English letters (‘a’ through ‘j’), return the total number of wonderful non-empty substrings in the string word. If the same substring appears multiple times, each occurrence should be counted separately.
You are given a string ’text’ consisting of words separated by a single space and a string ‘brokenLetters’ containing the broken keys on a malfunctioning keyboard. Return the number of words in ’text’ that can be fully typed using the working keys.
In a party, there are n friends with distinct arrival and departure times. Each friend chooses the smallest available chair. The task is to determine the chair number where the friend numbered targetFriend will sit.