Find Resultant Array After Removing Anagrams LeetCode solution in Python
1# Runtime: 111 ms (Top 32.35%) | Memory: 13.9 MB (Top 33.68%)2class Solution:3def removeAnagrams(self, words: List[str]) -> List[str]:4i = 05while i < len(words) - 1:6if sorted(words[i]) == sorted(words[i + 1]):7words.remove(words[i + 1])8continue9i += 110return words