Your question is Remove Anagrams From Strings. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
BILL may normalize word sequences while processing labels in BILL Spend & Expense. Given a list of lowercase strings, remove every string that is an anagram of the immediately preceding retained string. Preserve the first string from each consecutive anagram group and keep the original order.
Two strings are anagrams when they contain the same characters with the same frequencies, regardless of order.
Implement remove_anagrams(words), where words is a list of lowercase strings. Return a new list containing the first word from each consecutive group of anagrams. The original spelling and order of retained words must be preserved. An empty input must return an empty list.
def remove_anagrams(words):