We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
c - 'a' is the index of the array, which shold be an integer, so as you can see: if the char is a the index will be 0, and if the char is b then the index will be 1, and so on
PS: - 'a' is equivalent of - 97 according to ASCII table, except that it has a clearer expression of intention.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Strings: Making Anagrams
You are viewing a single comment's thread. Return to all comments →
c - 'a'
is the index of the array, which shold be an integer, so as you can see: if the char isa
the index will be0
, and if the char isb
then the index will be1
, and so onPS:
- 'a'
is equivalent of- 97
according to ASCII table, except that it has a clearer expression of intention.