[Java/Python 3] Two codes: Count the chars in Sentence.
Method 1\n\nJava\n\njava\n    public boolean checkIfPangram(String sentence) {\n        int[] cnt = new int[26];\n        for (int i = 0; i < sentence.length();
**Method 1**\n\n**Java**\n\n```java\n    public boolean checkIfPangram(String sentence) {\n        int[] cnt = new int[26];\n        for (int i = 0; i < sentence.length(); ++i) {\n            ++cnt[sentence.charAt(i) - \'a\'];\n        }\n        for (int i = 0; i < 26; ++i) {\n            if (cnt[i] == 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n```\nMake the above to 1 pass as follows:\n\n```java\n    public boolean checkIfPangram(String sentence) {\n        int[] cnt = new int[26];\n        for (int i = 0, pan = 0; i < sentence.length(); ++i) {\n            if (++cnt[sentence.charAt(i) - \'a\'] == 1 && ++pan == 26) {\n                return true;\n            }\n        }\n        return false;\n    }\n```\n\n----\n\n**Python 3**\n```python\n    def checkIfPangram(self, sentence: str) -> bool:\n        return len(Counter(sentence)) == 26\n```\n\n----\n\n**Method 2: Bit Manipulation** -- credit to **@KenpachiZaraki1**.\n\n```java\n    public boolean checkIfPangram(String sentence) {\n        for (int i = 0, cnt = 0, pan = (1 << 26) - 1; i < sentence.length(); ++i) {\n            cnt |= 1 << sentence.charAt(i) - \'a\';\n            if (cnt == pan) {\n                return true;\n            }\n        }\n        return false;\n    }\n```\n```python\n    def checkIfPangram(self, sentence: str) -> bool:\n        cnt, pan = 0, (1 << 26) - 1\n        for c in sentence:\n            cnt |= 1 << ord(c) - ord(\'a\')\n            if cnt == pan:\n                return True\n        return False\n```\nIn case you are interested in one liner:\n```java\n    public boolean checkIfPangram(String sentence) {\n        return sentence.chars().map(i -> 1 << i - \'a\').reduce(0, (a, b) -> a | b) == (1 << 26) - 1;\n    }\n```\n```python\n    def checkIfPangram(self, sentence: str) -> bool:\n        return functools.reduce(operator.ior, map(lambda c: 1 << ord(c) - ord(\'a\'), sentence)) == (1 << 26) - 1\n```\n**Analysis:**\n\nTime: `O(n)`, space: `O(1)`, where `n = sentence.length()`.
[]