You are viewing a single comment's thread. Return to all comments →
What is the line 'int x = (int)s-97;' do? I cannot get my mind around this.
It gets the relative index of the letter, so a is 0, b is 1, etc. by casting an int to a char, you get its ascii value. He is subtracting by the correct offset, 97, to get the indices in a range from 0-25. Hope I could help!