Java | Bitwise OR | 1 ms
This solution uses 26 bits in an integer for each of the 26 lowercase English letters. Then, it checks if all the 26 least significant bits are set.\n\nTime com
This solution uses 26 bits in an integer for each of the 26 lowercase English letters. Then, it checks if all the 26 least significant bits are set.\n\nTime complexity: `O(N)`.\nSpace complexity: `O(N)`.\n\n```\nclass Solution {\n    public boolean checkIfPangram(String sentence) {\n        var seen = 0;\n        for (var i = 0; i < sentence.length(); i++) {\n            seen |= 1 << (sentence.charAt(i) - \'a\');\n        }\n        return seen == (1 << 26) - 1;\n    }\n}\n```
['Java']