Wednesday, 2 October 2013

String to Integer Mapping

String to Integer Mapping

Does any one have algorithm or logic to Convert A to 1 ,B to 2, ... ,Z to
26 and then ,AA to 27, AB to 28 and so on BUT BA or cb or cbe or any
string which has letters in descending order should not be numbered a for
eg: BB should be 53 as BA is not numbered .this question is very similar
to Convert A to 1 B to 2 ... Z to 26 and then AA to 27 AB to 28 (column
indexes to column references in Excel) but with a slight difference as
mentioned above

No comments:

Post a Comment