You are given an array of strings
words, where each string represents a word containing lowercase English letters.You are also given an integer array
weightsof length 26, whereweights[i]represents the weight of thei^thlowercase English letter.The weight of a word is defined as the sum of the weights of its characters.
For each word, take its weight modulo 26 and map the result to a lowercase English letter using reverse alphabetical order (
0 -> 'z', 1 -> 'y', ..., 25 -> 'a').Return a string formed by concatenating the mapped characters for all words in order.
1 | class Solution { |