Skip to content

Instantly share code, notes, and snippets.

@yongjun823
Created August 20, 2017 14:38
Show Gist options
  • Select an option

  • Save yongjun823/4deaf5cd7053f424eb97bd3901971760 to your computer and use it in GitHub Desktop.

Select an option

Save yongjun823/4deaf5cd7053f424eb97bd3901971760 to your computer and use it in GitHub Desktop.
pangram check solution only alphabet
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