Since lower case letters are only 26 in number, we can use an array of size 26 instead and for getting the right index, we can subtract 97 from the ASCII code. So 'a''s index would become 97-97 = 0. Might not be significant but still an optimization.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Since lower case letters are only 26 in number, we can use an array of size 26 instead and for getting the right index, we can subtract 97 from the ASCII code. So 'a''s index would become 97-97 = 0. Might not be significant but still an optimization.