Created
August 20, 2017 14:38
-
-
Save yongjun823/4deaf5cd7053f424eb97bd3901971760 to your computer and use it in GitHub Desktop.
pangram check solution only alphabet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int is_pan(const char *str) | |
| { | |
| int arr[26] = { 0 }; | |
| int i=0; | |
| while (str[i] != '') | |
| { | |
| ++arr[(str[i++] | 32) - 'a']; | |
| } | |
| for (i = 0; i < 26; i++) | |
| { | |
| if (arr[i] == 0) | |
| return 1; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment