Hello,
Can you give me any hint on the variant question, which is solve the problem with “A” corresponding to 0? (p.97)
Shall we treat the right most position a special case and then all the positions on the left same to original rule?
For example, if we have “AA”, then it becomes (‘A’-‘A’+1)*26+(‘A’-‘A’) => 26.
Thanks for the help!
(Java) 7.3 Variant
xiaoran
#1
0 Likes
I think as long as your algorithm can solve the problem with reasonable runtime, it is always fine. From my point of view, yours look good to me.
0 Likes