Given an array of integers nums and an integer k, return the number of contiguous subarrays where the product of all the elements in the subarray is strictly less than k.
You are implementing a calendar system where you can add events. Each event is represented by a start time and an end time, defined as a half-open interval [startTime, endTime). You need to ensure that no more than two events overlap at any given time, or else return false. Your task is to implement a class, MyCalendarTwo, that will book events while preventing triple bookings.
You are given an integer array ’nums’ and an integer ‘k’. You can partition the array into at most ‘k’ non-empty adjacent subarrays. The score of a partition is defined as the sum of the averages of each subarray. Your goal is to return the maximum score that can be achieved by partitioning the array in any possible way, with each partition’s score calculated as the sum of averages of its subarrays.
You are given a string s of lowercase English letters and an array shifts, where shifts[i] represents the number of times to shift the first i + 1 characters of s. The shift operation for a letter means moving to the next letter in the alphabet, and if the letter is ‘z’, it wraps around to ‘a’. After applying all the shifts, return the final string.