You are given an array nums where each element represents the cost of collecting a chocolate of a specific type. You can perform an operation to change the types of chocolates, and each operation incurs a cost. Your task is to determine the minimum total cost to collect all types of chocolates.
You are given a list of positive integers nums. Your task is to partition this list into two non-empty arrays, nums1 and nums2, such that the absolute difference between the maximum element of nums1 and the minimum element of nums2 is minimized.
You are given a list of distinct positive integers nums. A permutation of nums is considered special if, for every pair of consecutive numbers in the permutation, one number is divisible by the other. Your task is to return the total number of special permutations of nums, modulo 10^9 + 7.
You are given a list of distinct strings words, where each string consists of exactly two lowercase English letters. You are tasked with finding the maximum number of pairs of strings that can be formed where one string is the reverse of the other.
Given a list of server requests and multiple queries specifying time intervals, determine the number of servers that did not receive any requests during each query’s time interval.