Optimised code| O(n) Time complexity| Easiest so far| Using sets| O(1) Space Complexity
Instead of traversing through each letter of the string we can just convert the given string in a set and check whether the set of the given string is a subset 
Instead of traversing through each letter of the string we can just convert the given string in a set and check whether the set of the given string is a subset of the set allowed. I found this way better than other approach and also the easiest way to implement. Here for checking subsets O(1) Time Complexity is required and to iterate through the whole array of string Time complexity = O(length (words)) i.e. O(n).  \nSearching in sets require O(1) complexity thus faster.\n```\nclass Solution:\n    def countConsistentStrings(self, allowed: str, words: List[str]) -> int:\n        d = set(allowed)\n        count=0\n        for word in words:\n            p = set(word)\n            if p.issubset(d):\n                count+=1\n        return count\n```\n**If you found this helpful please upvote!!***\n\nThank you for stopping by!! :)\nSuggestions and feedback are appreciated!
['Python']