You are viewing a single comment's thread. Return to all comments →
I'm curious is there an advantage to use this
for (int i = 0; i < strlen(s); i++) { if (s[i] >= 'a' && s[i] <= 'z') { small[s[i] - 'a'] = 1; } else if (s[i] >= 'A' && s[i] <= 'Z') { big[s[i] - 'A'] = 1; } }
vs
for (int i = 0; i < strlen(s); i++) { if (tolower(s[i]) >= 'a' && s[i] <= 'z') { small[tolower(s[i]) - 'a'] = 1; } }
Seems like cookies are disabled on this browser, please enable them to open this website
Pangrams
You are viewing a single comment's thread. Return to all comments →
I'm curious is there an advantage to use this
vs