You are given a words.
In a single operation, you can select any index i such that words.length where words[i] and words[i - 1] are anagrams of each other, and delete words[i] from words.
Repeat this process until no such index i can be chosen. Return the resulting array words.
Note: An anagram is a word created by rearranging the letters of a different word, using all original letters exactly once.
Constraints:
words.length
words[i].length
words[i] consists of lowercase English letters.
You are given a words.
In a single operation, you can select any index i such that words.length where words[i] and words[i - 1] are anagrams of each other, and delete words[i] from words.
Repeat this process until no such index i can be chosen. Return the resulting array words.
Note: An anagram is a word created by rearranging the letters of a different word, using all original letters exactly once.
Constraints:
words.length
words[i].length
words[i] consists of lowercase English letters.