java beginner friendly || constant space
Given constraint :\nsentence consists of lowercase English letters.\nIdea is to make a 26 size array (representing a to z ) and mark the presence of character i
**Given constraint :**\n`sentence consists of lowercase English letters.`\nIdea is to make a 26 size array (representing a to z ) and mark the presence of character in it.\n\n**CODE:**\n```\n public boolean checkIfPangram(String sentence) {\n         boolean[] arr=new boolean[26];\n        for(char ch:sentence.toCharArray()){\n             int idx=(int)(ch-\'a\');\n            arr[idx]=true;\n        }\n       \n         for(boolean val:arr){\n             if(!val) return false;\n         }\n        return true;\n    }\n```\n\n**Complexity:**\n`Time:O(n) and Space:O(1) [ constant space]`\n\nPlease **UPVOTE** if found it helpful :). Feel free to reach out to me or comment down if you have any doubt.
['Java']