3139. Minimum Cost to Equalize Array
You are given an integer array
numsand two integerscost1andcost2. You are allowed to perform either of the following operations any number of times:
- Choose an index
ifromnumsand increasenums[i]by1for a cost ofcost1.- Choose two different indices
i,j, fromnumsand increasenums[i]andnums[j]by1for a cost ofcost2.Return the minimum cost required to make all elements in the array equal*.*
Since the answer may be very large, return it modulo
109 + 7.
3138. Minimum Length of Anagram Concatenation
You are given a string
s, which is known to be a concatenation of anagrams of some stringt.Return the minimum possible length of the string
t.An anagram is a word or phrase formed by rearranging the letters of a word or phrase, typically using all the original letters exactly once.