solution A: Process the first char of the string firstly , then process the others recursively:
solution B: Process the last char of the string firstly, then process the remains recursively:
return s!= ""?26*titleToNumber(s.substr(0,s.size()-1))+s[s.size()-1] -64:0;
Then which one is better? OJ shows that the first one's runtime is 14ms, second is 16ms in my computer. Personally, I prefer the first one which matches my mind better.