Python 2 different approaches | beats 96% time, O(1) solution!
\nclass Solution:\n    def checkIfPangram(self, sentence: str) -> bool:\n        \n        # naive approach - 1\n        # freq = {}\n        # for i in sentenc
```\nclass Solution:\n    def checkIfPangram(self, sentence: str) -> bool:\n        \n        # naive approach - 1\n        # freq = {}\n        # for i in sentence:\n        #     freq[i] = freq.get(i, 0) + 1\n        # if len(freq) == 26: return True\n        # return False\n        \n        # optimized approach - 2\n        occurred = 0\n        for i in sentence:\n            temp = ord(i) - ord(\'a\')\n            occurred |= (1 << temp)\n        if occurred == (1 << 26) - 1:\n            return True\n        return False\n```\nFor more such solutions: https://github.com/vanigupta20024/Programming-Challenges
['Python', 'Python3']